On Aug 5, 2011, at 12:56 AM, Joergen W. Lang wrote: > tr:nth-child(1) th > > works just fine. Styling the tfoot seems to be a different story, though. I > do not see any other way to reference it explicitely without using > > tfoot tr:nth-child(2) td:nth-child(3) { ... }
Indeed, if you need different styling for rows or cells in a tfoot, you need to isolate it in your selector better I think: tfoot > tr:nth-child(2) td:nth-child(3) { ... } >> Of course - the tfoot comes after the tbody in the rendering, and >> thus the counting of rows. > > Error on my side. I was mistaken because tfoot needs to be defined before > tbody. In html5, tfoot can come after tbody in the source code. http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.html#the-tfoot-element (the wording is more confusing that last time I checked that… :-p) Philippe -- Philippe Wittenbergh http://l-c-n.com/ ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/