Grouping Table Rows and Page Breaks

I have a relatively long table. Each entry has six lines. So the element with id 16 has <tr-16-1><tr-16-2>.....<tr-16-6>, id 25 will be <tr-25-1><tr-25-2>.....<tr-25-6>, etc.

I would like page breaks not to break any group of six lines. Therefore, if <tr-25-6>it continues on a new page, I would like everyone to <tr-25's>break with it.

I can easily attach a class to all six lines if that helps. Can someone point me in the right direction how to do this? Many thanks for your help.

+5
source share
3 answers

, , tbody, tbody, 6 ( ),

@media print {
    tbody {
        page-break-inside: avoid;
    }
}

tbody.
, page-break-inside Firefox ( # 132035)

+5

:

@media print {
    tr, td, th { page-break-inside:avoid }
}
+1

@media, :

class=print-entire :

table.print-entire tr td, table.print-entire tr th {
        page-break-inside: avoid;
    }
+1

All Articles