Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pagebreaks where User wants them

Status
Not open for further replies.

AndyGroom

Programmer
May 23, 2001
972
0
0
GB
I've got an HTML document consisting of a number of tables of varying height. When the document is printed, tables invariably end up starting on one page and finishing on the next. I don't want a pagebreak after every table as some might only have a few lines and it might be possible to get five or six tables on a page before a break is necessary.

If I placed a tickbox after each table which the user could tick if they wanted a pagebreak at that point, how do I then 'convert' the ticked boxes into pagebreaks? Or - dream scenario - is it possible to automatically pagebreak so that tables never get split up if they don't fit on a page?

- Andy
___________________________________________________________________
If a man speaks in a forest and there are no women around to hear him - will he still be wrong?
 
Hi

Had you read up on [tt]page-break-inside[/tt] ?
CSS:
table [teal]{[/teal]
  [COLOR=coral]page-break-inside:[/color] [COLOR=darkgoldenrod]avoid[/color];
[teal]}[/teal]

The [tt]checkbox[/tt]-based page break toggling should change the [tt]previousSibling[/tt] [tt]table[/tt]'s above mentioned CSS property. A JavaScript framework would be helpful in this. Are you using one ?


Feherke.
[link feherke.github.com/][/url]
 
I'll give that a try thanks!

- Andy
___________________________________________________________________
If a man speaks in a forest and there are no women around to hear him - will he still be wrong?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top