On Aug 4, 2011, at 10:58 PM, Joergen W. Lang wrote:
>> Pretty weird. The first time I loaded your test case, it worked fine,
>> then I reloaded and failure. I save the page locally, and it never
>> worked correctly (from my local server).
>
> Only S5.1 or also other browsers?
Safari 5.1 - the nth-child selectors never kicked in, your original page was
open in another tab; I didn't 'save', I copied the source code from your page
into a new doc, saved it an opened it. As I said, real weird.
>
>> The one difference I can see: thead, tbody, tfoot. And indeed, using
>> those would solve your test case.
>
> That indeed fixes it. Omitting tfoot appears to be OK.
Of course - the tfoot comes after the tbody in the rendering, and thus the
counting of rows.
> When using thead/tbody, the row count is offset by 1 (header rows are not
> counted). Same goes for adjacent siblings.
That is normal, each table-row-group resets the count.
> For styling th elements a more explicit selector is needed (assuming two rows
> of th), e.g.:
>
> thead tr:nth-child(2) th:nth-child(4) { ... }
Why would that be ?
Philippe
--
Philippe Wittenbergh
http://l-c-n.com/
______________________________________________________________________
css-discuss [[email protected]]
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/