4 answers

1 accepted

Sorry for the late reply. Well actually, this is not as easy as it seems first, because Flying Saucer, the PDF rendering engine Confluence uses, supports only CSS 2.1 (and not even everything from this spec). So nth-child is not supported (as you mentioned). It's not possible either to apply JavaScript to the intermediate HTML code.

The only way to achieve an nth-child-alike effect is to look at fallbacks for old IE browsers using CSS only. There is only one way that I know of, using the adjacent sibling selector. It's pretty ugly and you might need a log of CSS code if your tables are big. But in general it works fine (I tested it).