Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Printing a fragment from a web page

Reply
Thread Tools

Printing a fragment from a web page

 
 
Nicolae Fieraru
Guest
Posts: n/a
 
      06-03-2005
Hi All,

I have some pages on a web site and they respect some template, with buttons
to the top, background image, tables, etc
I would like to allow a user to print out only a part of the page, but
without the buttons and the rest of the page. I am not sure it can be done.
If anybody knows about this, please let me know.

Regards,
Nicolae


 
Reply With Quote
 
 
 
 
Luigi Donatello Asero
Guest
Posts: n/a
 
      06-03-2005

"Nicolae Fieraru" <(E-Mail Removed)> skrev i meddelandet
news:(E-Mail Removed)...
> Hi All,
>
> I have some pages on a web site and they respect some template, with

buttons
> to the top, background image, tables, etc
> I would like to allow a user to print out only a part of the page, but
> without the buttons and the rest of the page. I am not sure it can be

done.
> If anybody knows about this, please let me know.
>
> Regards,
> Nicolae


You need 2 different external style sheets: one for the screen and another
for the print version which you insert in the head of your html code.

--
Luigi ( un italiano che vive in Svezia)
https://www.scaiecat-spa-gigi.com/







 
Reply With Quote
 
 
 
 
Luigi Donatello Asero
Guest
Posts: n/a
 
      06-03-2005

"Luigi Donatello Asero" <(E-Mail Removed)> skrev i meddelandet
news:hy0oe.26337$(E-Mail Removed)...
>
> "Nicolae Fieraru" <(E-Mail Removed)> skrev i meddelandet
> news:(E-Mail Removed)...
> > Hi All,
> >
> > I have some pages on a web site and they respect some template, with

> buttons
> > to the top, background image, tables, etc
> > I would like to allow a user to print out only a part of the page, but
> > without the buttons and the rest of the page. I am not sure it can be

> done.
> > If anybody knows about this, please let me know.
> >
> > Regards,
> > Nicolae

>
> You need 2 different external style sheets: one for the screen and another
> for the print version which you insert in the head of your html code.
>
> --
> Luigi ( un italiano che vive in Svezia)
> https://www.scaiecat-spa-gigi.com/



You insert in the head the links to respective external relative style
sheets.
So, you have to prepare these style sheets first.


--
Luigi ( un italiano che vive in Svezia)
https://www.scaiecat-spa-gigi.com/







 
Reply With Quote
 
Nicolae Fieraru
Guest
Posts: n/a
 
      06-04-2005
Hi Luigi,

Ok, so if I have two different CSS files included in the head, what do I do
next with them?
How can the styles hide buttons?

Regards,
Nicolae



"Luigi Donatello Asero" <(E-Mail Removed)> wrote in message
news:NA0oe.26338$(E-Mail Removed)...
>
> "Luigi Donatello Asero" <(E-Mail Removed)> skrev i meddelandet
> news:hy0oe.26337$(E-Mail Removed)...
>>
>> "Nicolae Fieraru" <(E-Mail Removed)> skrev i meddelandet
>> news:(E-Mail Removed)...
>> > Hi All,
>> >
>> > I have some pages on a web site and they respect some template, with

>> buttons
>> > to the top, background image, tables, etc
>> > I would like to allow a user to print out only a part of the page, but
>> > without the buttons and the rest of the page. I am not sure it can be

>> done.
>> > If anybody knows about this, please let me know.
>> >
>> > Regards,
>> > Nicolae

>>
>> You need 2 different external style sheets: one for the screen and
>> another
>> for the print version which you insert in the head of your html code.
>>
>> --
>> Luigi ( un italiano che vive in Svezia)
>> https://www.scaiecat-spa-gigi.com/

>
>
> You insert in the head the links to respective external relative style
> sheets.
> So, you have to prepare these style sheets first.
>
>
> --
> Luigi ( un italiano che vive in Svezia)
> https://www.scaiecat-spa-gigi.com/
>
>
>
>
>
>
>



 
Reply With Quote
 
Luigi Donatello Asero
Guest
Posts: n/a
 
      06-04-2005

"Nicolae Fieraru" <(E-Mail Removed)> skrev i meddelandet
news:42a0f619$(E-Mail Removed)...
> Hi Luigi,
>
> Ok, so if I have two different CSS files included in the head, what do I

do
> next with them?
> How can the styles hide buttons?
>
> Regards,
> Nicolae



You want to show the buttons on the screen but not when you print the page,
donīt you?


--
Luigi ( un italiano che vive in Svezia)
https://www.scaiecat-spa-gigi.com/sv...e-i-bionaz.php




 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      06-04-2005
Gazing into my crystal ball I observed "Nicolae Fieraru"
<(E-Mail Removed)> writing in news:(E-Mail Removed):

> Hi All,
>
> I have some pages on a web site and they respect some template, with
> buttons to the top, background image, tables, etc
> I would like to allow a user to print out only a part of the page, but
> without the buttons and the rest of the page. I am not sure it can be
> done. If anybody knows about this, please let me know.
>
> Regards,
> Nicolae
>
>

In an external stylesheet:

@media screen {
/*all your screen CSS info
..copyright {font-size:85%;}
*/
}
@media print {
/*all the stuff you do not want printed
..copyright {display:none}
*/
}

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
 
Reply With Quote
 
Stan McCann
Guest
Posts: n/a
 
      06-04-2005
"Nicolae Fieraru" <(E-Mail Removed)> wrote in
news:(E-Mail Removed):
> I have some pages on a web site and they respect some template, with
> buttons to the top, background image, tables, etc
> I would like to allow a user to print out only a part of the page,
> but without the buttons and the rest of the page. I am not sure it
> can be done. If anybody knows about this, please let me know.


My first thought was to let the user highlight the part they want to
print, then print it. Reading over the post again, I figure this might
be what you want: http://www.w3schools.com/css/css_mediatypes.asp

--
Stan McCann "Uncle Pirate" http://stanmccann.us/pirate.html
Webmaster/Computer Center Manager, NMSU at Alamogordo
http://alamo.nmsu.edu/ There are 10 kinds of people.
Those that understand binary and those that don't.
 
Reply With Quote
 
Luigi Donatello Asero
Guest
Posts: n/a
 
      06-04-2005

"Stan McCann" <(E-Mail Removed)> skrev i meddelandet
news:Xns966AEB41FF131stanmccann@216.234.192.142...
> "Nicolae Fieraru" <(E-Mail Removed)> wrote in
> news:(E-Mail Removed):
> > I have some pages on a web site and they respect some template, with
> > buttons to the top, background image, tables, etc
> > I would like to allow a user to print out only a part of the page,
> > but without the buttons and the rest of the page. I am not sure it
> > can be done. If anybody knows about this, please let me know.



Following my previous answers on this subject, I can add that
the basic thing is that you design a div container in the style sheet for
printing in which you use the value: none for the property display, so that
the content which is within this "div" container will not be displayed in
the print version.
But it seems as there are also more refined ways which I am trying to learn.
http://www.w3.org/TR/REC-CSS1#display
http://www.w3.org/Style/Examples/007/target.html#tab1

http://www.w3.org/TR/REC-html40/types.html#h-6.13


--
Luigi ( un italiano che vive in Svezia)
https://www.scaiecat-spa-gigi.com/sv...e-i-bionaz.php







 
Reply With Quote
 
Luigi Donatello Asero
Guest
Posts: n/a
 
      06-04-2005

"Luigi Donatello Asero" <(E-Mail Removed)> skrev i meddelandet
news:HFfoe.139414$(E-Mail Removed)...
>
> "Stan McCann" <(E-Mail Removed)> skrev i meddelandet
> news:Xns966AEB41FF131stanmccann@216.234.192.142...
> > "Nicolae Fieraru" <(E-Mail Removed)> wrote in
> > news:(E-Mail Removed):
> > > I have some pages on a web site and they respect some template, with
> > > buttons to the top, background image, tables, etc
> > > I would like to allow a user to print out only a part of the page,
> > > but without the buttons and the rest of the page. I am not sure it
> > > can be done. If anybody knows about this, please let me know.

>
>
> Following my previous answers on this subject, I can add that
> the basic thing is that you design a div container in the style sheet for
> printing in which you use the value: none for the property display, so

that
> the content which is within this "div" container will not be displayed in
> the print version.



Of course, you also have to refer to the same div class in the body of the
html code of the page which you want to print if you want the property
display: none; to work.

--
Luigi ( un italiano che vive in Svezia)
https://www.scaiecat-spa-gigi.com/sv...e-i-bionaz.php





 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
position page fragment (anchor) on top of page. Erwin Moller HTML 1 07-27-2012 10:42 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:50 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:28 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-18-2007 10:11 AM
Re: Printing a fragment from a web page Luigi Donatello Asero HTML 0 06-04-2005 11:34 AM



Advertisments