June 13, 2011, 4:21 p.m.
posted by astropy
Creating a Style Sheet for Print
You can designate a style sheet to be used only when printing, only on screen, or for both print and screen. This allows you to hide those elements that don't need to be printed, as well as set special formatting that works well on paper for the elements you do want to print.
To create a style sheet for print:
Add media="print" to the opening link or style tags (Figure).
Figure. In this (X)HTML document I've linked to the screen.css style sheet for the styles that will be used when displaying the page onscreen and the print.css style sheet for the styles that should be used when printing.
Or, in an @import rule, add print after the style sheet's URL (Figure).
Figure. In this example, which should have the same effect in current browsers, I've linked to the screen.css style sheet but imported the print.css style sheet.