I have a relatively long table. Each record has six rows. So an item with an identifier of 16 has <tr-16-1><tr-16-2>.....<tr-16-6>
, identifier 25 would be <tr-25-1><tr-25-2>.....<tr-25-6>
, etc.
I would like the page breaks to not split any grouping of the six rows. So if <tr-25-6>
would continue on a new page, I would like all <tr-25's>
to break with it.
I can easily attach a class to all six rows if that would help. Can anyone please point me in the right direction on how to do this? Thanks so much for your help.
From the Table Properties dialog box, select the Row tab; Select the option 'Allow Row to break across pages' Click OK.
Put your cursor where you want one page to end and the next to begin. Go to Insert > Page Break.
A possibility is grouping all the rows that are referring to the same record inside a single tbody
, so you have more tbody
each one containing 6 rows (it's perfectly fine and seems to be logical as an atomic group),
then add this rule for media print
@media print {
tbody {
page-break-inside: avoid;
}
}
In this way a page break inside a tbody
will be avoided.
Unfortunately page-break-inside
is supported on every modern browser except Firefox (Bug #132035)
I would give this a shot:
@media print {
tr, td, th { page-break-inside:avoid }
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With