HTML Printing: Use a Style Sheet to Force a Page Break
Designing web pages for printing can be difficult. Here’s how to force a printer to insert a page break.
Designing web pages that can be easily printed can be very, very difficult. PDFs are perfect, but expensive to do dynamically. Anyway, here is a cheap way to insert a page break into a page.
Place the following code in the HEAD of the html:
<STYLE TYPE='text/css'>
P.pagebreakhere {page-break-before: always}
</STYLE>
Then place the following code in the BODY of the html where you want the pagebreak:
<P CLASS="pagebreakhere">






Add New Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Add New Comment