A variable number of tables of variable length get generated dynamically. Right now, they are all put inside a main table to retain the main header, and it works just fine.
The spacing between the sub-tables is added as padding-top of the td containing each sub-table, like this (simplified):
The problem is that the padding is applied even when a sub-table starts on a new page, which is obviously not necessary.
Is there a way to add padding (or whatever space) only when not on top of a new page?
The spacing between the sub-tables is added as padding-top of the td containing each sub-table, like this (simplified):
<table class="main">
<thead>...</thead>
<tbody>
<tr class="rowSubTable">
<td>
<table>...</table>
</td>
</tr>
<tr class="rowSubTable">
<td>
<table>...</table>
</td>
</tr>
</tbody>
</table>
tr.rowSubTable:not(:first-child) > td {
padding-top: 40px;
}
The problem is that the padding is applied even when a sub-table starts on a new page, which is obviously not necessary.
Is there a way to add padding (or whatever space) only when not on top of a new page?