Media Print Style Sheet Example
One of the most important features of style sheets is that they specify how a document is to be presented on different media: on the screen, on paper, with a speech synthesizer, with a braille device, etc. This is a simple example of style sheet for print media.
@media print
{
@page { margin: 10%; }
h1, h2 { page-break-after: avoid; page-break-inside: avoid; }
pre { page-break-inside: avoid; }
ul, ol, dl { page-break-before: avoid; }
}
Pay attention to margin and page-break styles.
Thursday, May 13, 2004 4:59 AM