News:

This week IPhone 15 Pro winner is karn
You can be too a winner! Become the top poster of the week and win valuable prizes.  More details are You are not allowed to view links. Register or Login 

Main Menu

Adding page breaks to your web pages

Started by charleychacko, October 15, 2006, 12:59:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

charleychacko

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). You are not allowed to view links. Register or Login