Page Break - How to keep tables together?

They have: 10 posts

Joined: Jun 1999

I have a html page with 3 large tables. When the user prints out the page, it breaks up in the middle of the second table. How can I avoid this by doing a page break when printed after each table?

----------
Gina

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

You can't do it normally, but you have options.

You can set up a special page for printing where you manually add enough space between the tables to place them on different pages.

You can also use CSS if the people printing have IE4+, I'm not sure if it works in NS4+ yet. Here are some links on the command for it:

http://www.w3.org/TR/REC-CSS2/page.html#page-break-props
http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/pageBreakAfter.asp?#pageBreakAfter

There are also other things, like creating an Adoe Acrobat page- but I think it costs money to get the creation program (the reader is free though).

----------
Page Resource: http://www.pageresource.com
JavaScript City: http://www.javascriptcity.com

They have: 10 posts

Joined: Jun 1999

Thanks John, it worked!

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.