Creating Pagebreaks in HTML documents

See Also ß


We've had a few discussions on how to create page breaks when printing HTML documents to a printer. Here's a solution I ran across recently using Style Sheets:
aasda
<STYLE>
   .pagebreak {page-break-before:always}
</STYLE>

Then in your HTML:

<div class='pagebreak'>&n bsp;</div>

You can also attach the pagebreak style to any other text tags such as H1, H2 etc. but it will not work on individual non-paragraph elements like BR, P or HR. Make sure that there is some text between the tags or the page break will not be generated, even if you use & nbsp; to create a blank space.


Last Updated: 12/03/98