Forum How do I...?

Long tables and bg in even rows, also called tigerstripes

petcat
Hi,
I am not totally sure if this issue has been addressed to earlier, but I have search through this forum and haven't found anything on this particular case.

I want to add tigerstripes to tables and I get this done nearly ok except that because of the automatic reappearing of the heading when long tables span over several pages, the tigerstripes sometimes get mixed up.
I want the row beneath the heading of the table to be white and the next grey. But if the row colour was white at the end of the previous page it becomes grey on the next page. My header is also grey so this looks bad..

The way I add tigerstripes to a table is like this:

table tbody tr:nth-child(even) td{
background-color: cmyk(19%,14%,13%,0%);
}

Is there a way to ensure that the first row on each page the table span over will be white?

I tried to add this, but it didn't make any difference:
table tbody tr:nth-child(1) td{
background-color: cmyk(0%,0%,0%,0%);
}

Am I doing this wrong, missing something or is it a bug?

Many thanks for any suggestions.

PS! I have done some further testing now and when I add float:left on my table then suddenly the tigerstripes get mixed up as dscribed above, but if I remove it it acts perfectly ok... also not using float:left but having a table within another table also mixes the tigerstripes...
mikeday
Unfortunately it is not possible to apply colors to table rows that change if they immediately follow a page break, as CSS selectors only apply to the structure of the unpaginated document. If you can keep the height of the rows fixed, then you might be able to line it up just right so that it always breaks after an even number of rows, but that's about the only option for now, sorry.