Lets say we have a table with many rows. When transforming my XML to a PFD via XSLT I want certain rows to not split across a page break. At the moment I have
<table>
<tr>...</tr>
<tr>...</tr>
<div style="page-break-inside:avoid">
<tr>...</tr>
<tr>...</tr>
</div>
<tr>...</tr>
</table>
That works well to a point. Porblem is that the columns within the div nolonger inherit their widths from the first row in the table as normal.
Is there anything I can do with the div to maintian the inheritance? Or should I try a different approach?
It is invalid HTML syntax to have
<div>as a child of<table>.Try this instead…
Or better still, set it via CSS – either against all
<tr>elements…… or set
class="myTR"as an attribute of the<tr>, and then…