I have an html table like this:
<div class="report">
<table>
<thead>...</thead>
<tfoot>...</tfoot>
<tbody>
<tr class="row-to-style">...</tr>
</tbody>
<tbody>...</tbody>
</table>
</div>
Note that all tbody's above are identically structured. I want to style the very first tr.row-to-style row differently from the others. Each tbody will have a tr.row-to-style but I want to only affect the first such row on a page. The output is paged media, specifically PrinceXML produced pdf files from xhtml source files. This means we can use advanced css selectors, cross-browser compatibility is not required, and javascript cannot be used.
It's easy enough to style the target row on the first page of output. I can use:
table tfoot + tbody tr.row-to-style {...}
Also, if I know how many tbody's will fit on a page, I can do something like:
table tbody:nth-of-type(4n+1) tr.row-to-style {...}
But if I don't know the number of tbody's that will fit on a page, how can I target the first one?
On output, in effect, the thead and tfoot sections are repeated for each page. The tables were designed this way specifically to take advantage of this. We allow for page breaks after a tbody. The output may contain several pages.
Thus, the output has sort of a pseudo-thead and pseudo-tfoot on each page. But I see no way of using such to mark the first tbody on a page. Any ideas? Thanks...