Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Style Sheet For Printing

Status
Not open for further replies.

Skittle

ISP
Sep 10, 2002
1,528
US
I have a page that lists names and addresses from a database via ASP. I have formatted it for displaying on screen. I would like give users the option to create a formatted print option to force a page break after every 30 or so records with headers at the top of the page.

I have heard it is possible to define a style sheet to associate with printing any page. Is it possible to work with style sheets so the displayed version does not show the extra headers and page break on the screen but does print them? Does anybody now of a FAQ or an example on how this works? Do you create a 'print' button and action a page using the style sheet to a printer or is it activated when you select the prowser print option?
 
This would be how you define the stylesheet for printing...
<style type=&quot;text/css&quot; media=&quot;print&quot;>
.print {display:none;}
</style>

I have used this for printing watermarks on only the print version. I would think you could manipulate the display attribute to achieve your print headers by assigning a the header to a class such as .print {display:all;}.

Here is one article I found:

Hope this helps,
Mickey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top