Tips Tricks Samples

CSS Print Formatting

A second CSS tip for you:

We all know the benefits of using CSS to format your web page. What is less well know is that you can load a second style sheet which can be used when printing the page. It means that you don't need to worry about hiding navigation etc before the user wants to print as you can simply redefine all of your navigation layers to be invisible when printing. So a page with two stylesheet will have the following HTML:
<link rel="stylesheet" href="http://mysite.com/mydb.nsf/style.css" />
<link rel="stylesheet" href="http://mysite.com/mydb.nsf/printstyle.css" media="print" />