Insert a page break in HTML

D

Danny Ni

Hi,

Is it possible to enter a page break in a HTML document, when a HTML
document is diplayed in browser and user click print, the browser takes
control of paging . I would like the browse to print to a certain point in
the document and eject the page and continue printing on the next page. Is
this possible?

TIA
 
G

Guest

You can do this using styles:

page-break-before: always;

I would suggest you put this in the tag which should appear at the top of
each page. e.g.

<h2 style="page-break-before: always;">Some text</h2>

This does require the browser to support CSS level 2 but will work
definitely in IE and Firefox.

Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,573
Members
45,046
Latest member
Gavizuho

Latest Threads

Top