page printing question

admin

Administrator
Staff member
I have a website with 4 tables, all of which are dynamically genererated, so essentially I never know how many rows(how long) the table is going to be. What I need help with is, I would like to use CSS to force a page break before a table if it is going to be split onto more than one page. So that way the table would start on a new page, and hopefully not be split at all, but only be split if it were longer than one whole page.

I've tried quite a few things revolving around page-break-inside... page-break-before, so please try to be somewhat specific. Thanks.What kind language are you using for the back end?

I did something similar in a jsp. I had the list of cases(rows of the table) and I figured out how many could nicely fit on the printed page. Then, as I was displaying them I checked to see if the page was full with the mod(%) function in java and if it was I closed the table </table> and then inserted <BR STYLE="page-break-after:always"> <table> and continued to loop through the list.

Hope this helps...No it doesn't sorry, but thanks for the input... Rows may not be of the same size. I just want to see if it's possible to force a table to stay together, on one page and not be split up. Also, even if you cant solve my problem what is it that page-break-inside is supposed to do, specifically when set to avoid.
 
Back
Top