popster
asked on
Page break in HTML pages
Is it possible to insert a page break in HTML pages using javascripts or any other means? this is to facilitate the printing of a report. pls help.. thanks in advance..
regards,
popster
regards,
popster
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Add this inside your <head></head> tag:
<style>
p.page {page-break-before: always}
</style>
Then inside <body></body>
<p class="page">
What ever html stuff you want to print on one page
</p>
<style>
p.page {page-break-before: always}
</style>
Then inside <body></body>
<p class="page">
What ever html stuff you want to print on one page
</p>
<br style="page-break-before:a lways;">
or
br {
page-break-before:always;
}
or
br {
page-break-before:always;
}
http://www.slackerhtml.com/stylesheets/pagebreaks.html
http://www.htmlgoodies.com/beyond/css_print.html
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/properties/pagebreakafter.asp