'How to use "page-break-inside" for tbody tag?
I have an HTML file that I convert to PDF using the Wkhtmltopdf tool.
I am using page-break-inside: avoid style to escape table wrapping in pages (if there is no place on the current page for the table the whole table goes to a new pdf page), and it works great for tables.
The question is
I have this kind of table
<table >
<caption>Payments</caption>
<tbody>
<tr>
<th>line 1</th>
<td>100.00</td>
</tr>
<tr>
<th>line1 note 1</th>
<td>120.00</td>
</tr>
<tr>
<th>line1 note 2</th>
<td>20.00</td>
</tr>
</tbody>
<tbody>
<tr>
<th>line 2</th>
<td>100.00</td>
</tr>
<tr>
<th>line2 note 1</th>
<td>120.00</td>
</tr>
<tr>
<th>line2 note 2</th>
<td>20.00</td>
</tr>
</tbody>
</table>
where each block is tbody inside one big table, as the block can be too long and it can be bigger than one pdf page I want to wrap it by tbody, not by the table. I want the new tbody block to start from the new page (instead of cutting inside tbody block) if there is no place on the current page.

Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
