I have a pdf report generated using wkhtmltopdf. Part of it is a table with a HTML comments which could get as long as 3 pages. I already have the below CSS to avoid any table row or table cell having a page-break inside, which works well for smaller rows. However, in case of the row with large comment, the cell spans across multiple pages and spilling into the table header on the next page.
How can I make the overflown text sit inside the cell instead of overlapping the header on the next page?
thead {
display: table-header-group;
}
tfoot {
display: table-row-group;
}
tr, td, th, .dont-break {
page-break-inside: avoid !important;
}