Am 04.08.11 13:31, schrieb Philippe Wittenbergh:

On Aug 4, 2011, at 6:52 PM, Joergen W. Lang wrote:

Culprit:   Safari 5.1/OS X 10.6.8 Test page:
www.joergen-lang.de/test/nthchild-cells.html

[...]

The problem only occurs when working with a local copy with S5.1.
Newer webkits play along.

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?

My basic table testcase is here:
http://dev.l-c-n.com/_temp/nth-child_table.html

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.

Note:

When using thead/tbody, the row count is offset by 1 (header rows are not counted). Same goes for adjacent siblings.

Note 2:

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) { ... }

Thanks a lot.

Jørgen
______________________________________________________________________
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/

Reply via email to