2 replies
by jay eckles
You should investigate the CSS2 media rule. Here's a link to the W3C's CSS level 2 rec: http://www.w3.org/TR/REC-CSS2/media.html.
What the rule allows you to do is specify different styling rules for different types of media. The most common media is the screen, but you can also specify other media, such as in your case, print (examples of other media are aural, handheld, etc.). Then you can create CSS rules that will do things like hide banners and navigation elements, change colors to black on white, etc.
The drawback to this technique is that it is limited to browsers that fully support CSS Level 2. The alternative is, as you say, one document for the web and another for printing.
Good luck.
by talleywho
I have done this before using a ASP. All of my content is kept in a separate data store and put into a number of template files to be displayed in the browser. My default template has all the nav, banners, etc. I provide the user a link at the bottom of each page that says "Printer Friendly Format". By clicking this link a window opens that grabs the content on the page they are currently viewing and puts in a blank template, nothing but content.
Separate your content from your HTML and you will be set free.
b
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending