Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...If I'd only had resource like eng-tips when I was just getting started! I might have dazzled them with my brilliance instead of my BS..."

Geography

Where in the world do Tek-Tips members come from?

Pagebreaks where User wants them

AndyGroom (Programmer)
15 Jun 12 11:46
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?

feherke (Programmer)
15 Jun 12 12:11
Hi

Had you read up on page-break-inside ?

CODE --> CSS

table {
page-break-inside: avoid;
}

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

Feherke.
http://feherke.github.com/

AndyGroom (Programmer)
15 Jun 12 12:20
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?

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close