13.07.2015 Views

Beginning CSS: Cascading Style Sheets for Web Design, 2nd ...

Beginning CSS: Cascading Style Sheets for Web Design, 2nd ...

Beginning CSS: Cascading Style Sheets for Web Design, 2nd ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Controlling Page BreaksChapter 13: Styling <strong>for</strong> PrintTwo print properties, or paged media properties as it is referred to by the W3C, that all popularbrowsers have in common are page-break-be<strong>for</strong>e and page-break-after. These properties are outlinedin the following table.Propertypage-break-be<strong>for</strong>epage-break-afterValueauto | always | avoid | left | rightInitial value: autoauto | always | avoid | left | rightInitial value: autoThe page-break-be<strong>for</strong>e and page-break-after properties control where page breaks are made.Un<strong>for</strong>tunately, even though different browsers offer support <strong>for</strong> these two properties, they do not supportall the values that <strong>CSS</strong> 2 allows. Firefox, Safari, IE 6, and IE 7 support only the keywords alwaysand auto. Opera supports all of the keywords.The page-break-be<strong>for</strong>e and page-break-after properties dictate where a page break should bemade depending on where an element appears in a document. A demonstration of page-break-be<strong>for</strong>eis shown in Figure 13-4.Figure 13-4a497

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

Saved successfully!

Ooh no, something went wrong!