22.12.2013 Views

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Whether the first page of a document is :left or :right depends on the major<br />

writing direction of the document and is outside the scope of this document.<br />

However, to force a :left or :right first page, authors may insert a page break<br />

before the first generated box (e.g., in HTML, specify this for the BODY element).<br />

Properties specified in a :left (or :right) @page rule override those specified in<br />

an @page rule that has no pseudo-class specified. Properties specified in a :first<br />

@page rule override those specified in :left (or :right) @page rules.<br />

Note. Adding declarations to the :left or :right pseudo-class does not influence<br />

whether the document comes out of the printer double- or single-sided (which is<br />

outside the scope of this specification).<br />

Note. Future versions of CSS may include other page pseudo-classes.<br />

13.2.5 Content outside the page box<br />

When formatting content in the page model, some content may end up outside<br />

the page box. For example, an element whose ’white-space’ property has the<br />

value ’pre’ may generate a box that is wider than the page box. Also, when boxes<br />

are positioned absolutely [p. 113] , they may end up in "inconvenient" locations.<br />

For example, images may be placed on the edge of the page box or 100,000<br />

inches below the page box.<br />

A specification for the exact formatting of such elements lies outside the scope<br />

of this document. However, we recommend that authors and user agents<br />

observe the following general principles concerning content outside the page<br />

box:<br />

Content should be allowed slightly beyond the page box to allow pages to<br />

"bleed".<br />

User agents should avoid generating a large number of empty page boxes to<br />

honor the positioning of elements (e.g., you don’t want to print 100 blank<br />

pages). Note, however, that generating a small number of empty page boxes<br />

may be necessary to honor the ’left’ and ’right’ values for ’page-break-before’<br />

and ’page-break-after’.<br />

Authors should not position elements in inconvenient locations just to avoid<br />

rendering them. Instead:<br />

To suppress box generation entirely, set the ’display’ property to ’none’.<br />

To make a box invisible, use the ’visibility’ property.<br />

User agents may handle boxes positioned outside the page box in several<br />

ways, including discarding them or creating page boxes for them at the end<br />

of the document.<br />

13.3 Page breaks<br />

The following sections explain page formatting in <strong>CSS2</strong>. Five properties indicate<br />

where the user agent may or should break pages, and on what page (left or right)<br />

the subsequent content should resume. Each page break ends layout in the<br />

current page box [p. 176] and causes remaining pieces of the document tree<br />

[p. 30] to be laid out in a new page box.<br />

180

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!