I have generated a long report which displays via HTML. The users want to print the report (using the browser print). They also want page breaks at certain points in the printed document.
I have only the faintest idea how to force a page break in HTML. It has something to do with the CSS2 tag "page-break-before" (or "after"). But I can't get it to work. Here's what I've tried:
<style type='text/css'>
.new {page-break-before}
</style>
<span class="new"> Title1 </span>
print out lots of info...
<span class="new"> Title2 </span>
Etc.Please tell me if there's a way, and how, to insert code into HTML which will force a page break when the page is printed.
Thanks in advance.
-JeffTry taking it out of the css rule and put it in where you want the page break.
code:
<style type='text/css'>
</style>
<span class="new"> Title1 </span>
print out lots of info...
<span style="page-break-before: always;"> Title2 </span>
Etc.
page-break-before: always - forces a page break.
page-break-before: auto - allow browser to place the break.Most browsers only accept the code inline for controlling page breaks, plus you didn't give the attribute a value.
<span style="page-break-before:always;"> Title1 </span>
print out lots of info...
<span style="page-break-before:always;"> Title2 </span>Silly me. Of course I need a value. Duh!
Thanks, all!
-Jeff
I have only the faintest idea how to force a page break in HTML. It has something to do with the CSS2 tag "page-break-before" (or "after"). But I can't get it to work. Here's what I've tried:
<style type='text/css'>
.new {page-break-before}
</style>
<span class="new"> Title1 </span>
print out lots of info...
<span class="new"> Title2 </span>
Etc.Please tell me if there's a way, and how, to insert code into HTML which will force a page break when the page is printed.
Thanks in advance.
-JeffTry taking it out of the css rule and put it in where you want the page break.
code:
<style type='text/css'>
</style>
<span class="new"> Title1 </span>
print out lots of info...
<span style="page-break-before: always;"> Title2 </span>
Etc.
page-break-before: always - forces a page break.
page-break-before: auto - allow browser to place the break.Most browsers only accept the code inline for controlling page breaks, plus you didn't give the attribute a value.
<span style="page-break-before:always;"> Title1 </span>
print out lots of info...
<span style="page-break-before:always;"> Title2 </span>Silly me. Of course I need a value. Duh!
Thanks, all!
-Jeff