CodeAve.com CodeAve.com - CSS - Page Display
ASP
JavaScript
CSS
·Basics
·Page Display
·Text Display
·Script Writers
·Contents
·What's New?
HTML
Maps
Links
Mail List
Search
Sitemap


 


Page Break
One of the shortcomings of browser display is that the document rendered by the browser doesn’t usually print as well as it looks on screen especially when it comes to determining where a printed page should begin and end. CSS has a page break command that will accept two values before:always and after:always. You can specify that when printed which and how many pages will be printed from your one page displayed in the browser. The following example while very basic demonstrates both before and after rendering three printed pages from one browser page. If you use IE5.5 or better you should be able to print preview without having to actually print the documents.
View the Output
Text View
Print View
Mail this Link
Download the Code

<html>
<head>
<title>CodeAve.com/CSS - Page Break</title>
<body bgcolor="#FFFFFF">
<center>
Page 1
<br style="page-break-before:always;">
Page 2
<br style="page-break-after:always;">
Page 3
<p>
Use print preview on your browser to see how<br>
this page would print out to three pages
</center>
</body>
</html>

 

 

 



ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
Links | Search Engine db |  Privacy Statement |  Advertising Rates |  Email

CodeAve.com is hosted by MyHosting.com
Donate Food Online with a Mouse Click at TheHungerSite.com
Donate Land Online with a Mouse Click at TheRainForestSite.com
© 1999 - 2010 CodeAve.com
All Rights Reserved