Adding a print stylesheet to your website
I decided to add a nice print stylesheet to mximize.com so that if you would like to print a page you can without any hassle.. just click on the print button in your browser. To get this to work nicely I read the "going to print" article on A List Apart. Below is the result of the stylesheet. It will display only the article you are viewing and not all the stuff that isn't important, like the menu, images, form, ads etc etc... A quick and really simple way to make your webpage even more friendly for your viewers. To test you could click on the "print preview" button in your browser. body,code { font-family:verdana,arial,sans-serif;
background: white;
font-size: 12pt;
}
code {
font-family:courier new;
font-size:80%
}
#head,#menu,#google-line,.ad1,#extra,.details,form {
display:none
}
#content a:link:after, #content a:visited:after {
content: " (" attr(href) ") ";
font-size: 90%;
}
#content a[href^="/"]:after {
content: " (http://www.mximize.com" attr(href) ") ";
}To let the browser see the stylesheet just put the following code in your browser
<link rel="stylesheet" type="text/css" href="/print.css" media="print" /> 13166 viewed | 2 opinion(s) | del.icio.us | Digg it | Tjarko @ 03/07/07 16:10 cet



