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

The test case works fine on first load.
Reloading seems to mess things up.

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

Jørgen

Am 04.08.11 11:10, schrieb Philippe Wittenbergh:

On Aug 4, 2011, at 5:45 PM, Joergen W. Lang wrote:

I thought, this might work just as well (especially for tables with a lot of 
rows and cells):

tr:nth-child(0n+4) td:nth-child(0n+1),
tr:nth-child(0n+2) td:nth-child(0n+2),
tr:nth-child(0n+3) td:nth-child(0n+4),
tr:nth-child(0n+3) td:nth-child(0n+6),
tr:nth-child(0n+4) td:nth-child(0n+6) {
  background-color: lightgreen;
}


I verified that the selectors all work by themselves. When grouping
them the element count seems to get out of sync and 'random‘
elements get selected.

Do you have a test page that shows that 'randomness' ? And which
browser does show the issue ?

With my test table, 30 rows, 6 columns the above works correctly in
WebKit/Safari5.1 and Fx-aurora build. Are there rows/cells with
colspan or rowspan ?

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/

Reply via email to