(page requirements)

Adding page breaks to your web pages

Almost all printable document types can handle author specified page breaks. Wondering how to add page breaks to your web pages?
 
Starting with the release of Cascading Style Sheets 2 specification, you can finally suggest to browsers when to break pages when printing your web pages. The bad news is that only Explorer 4.x support this feature at this time. On the other hand, adding page break tags to web pages will not cause any ill effects on other browsers.
 
To suggest a page break, add <P style="page-break-before: always"> before the beginning of a new printed page. For example, if you place the following tags on a HTML page and print it using a compatible browser, you will end-up with three pages with the sample text.
 
<html>
<body>

This is the text for page #1.

<p style="page-break-before: always">

Page #2...

<p style="page-break-before: always">

Page #3...

</body>
</html>
Listing #1 : HTML code. Download pgbreak.html (0.23 KB).
 
 
Applicable Keywords : Cascading Style Sheets, Cascading Style Sheets 2, HTML, Internet Explorer, Explorer 4.x, Explorer 5.x, Internet, World Wide Web
 
 
 
Copyright © 2009 Chami.com. All Rights Reserved. | Advertise | Created in HTML Kit editor