inserting a page break

J

jose

Greetings.

I would like to insert a page break in the HTML code to allow for a
page break when someone prints that page. Is this possible?

Any help would be greatly appreciated.

thanks,

josé
 
M

Mike Minor

Here is what I've used in the past...

<style type="text/css">

DIV.page { page-break-after: always; }

</style>

then create divisions in the page where you want the page breaks.

<div class="page">

.....stuff to be printed on the page

</div>
A page break will follow the </div>. Repeat the <div class="page">, add
additional stuff for the subsequent pages, followed by </div> where you want
page breaks.

THe problem with this method is not knowing how many lines a user's printer
allows per page. To use this with any success, you pretty well have to have
a captive audience, all have the same set up on their printes as far as top
and bottom margins are concerned. It works well in an intranet environment
where you have some control over your user's, but as for internet use, it's
pretty much hit and miss, I think.

Good luck....

Mike Minor
Z-Code Systems, Inc,

jose said:
Greetings.

I would like to insert a page break in the HTML code to allow for a
page break when someone prints that page. Is this possible?

Any help would be greatly appreciated.

<http://www.google.com/search?q=css+print+page-break>
 
J

jose

Here is what I've used in the past...

<style type="text/css">

DIV.page { page-break-after: always; }

</style>

then create divisions in the page where you want the page breaks.

<div class="page">

....stuff to be printed on the page

</div>
A page break will follow the </div>. Repeat the <div class="page">, add
additional stuff for the subsequent pages, followed by </div> where you want
page breaks.

THe problem with this method is not knowing how many lines a user's printer
allows per page. To use this with any success, you pretty well have to have
a captive audience, all have the same set up on their printes as far as top
and bottom margins are concerned. It works well in an intranet environment
where you have some control over your user's, but as for internet use, it's
pretty much hit and miss, I think.

Good luck....

Mike Minor
Z-Code Systems, Inc,







<http://www.google.com/search?q=css+print+page-break>

This is great! Thanks!
 

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,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top