Re: idea about pseudo-selectors

On Tue, Aug 08, 2006 at 06:17:43PM +0800, Ming Teo wrote:
> I had an idea for something like this... from what I see in the CSS3 
> working draft, there's |:nth-child| and :nth-child-of-type etc, but how 
> would one, say cover odds and evens?

You might want to go back to that and look at the nth-child section
again. The first four examples cover that.

http://www.w3.org/TR/css3-selectors/#nth-child-pseudo

tr:nth-child(2n+1) /* represents every odd row of an HTML table */
tr:nth-child(odd)  /* same */
tr:nth-child(2n)   /* represents every even row of an HTML table */
tr:nth-child(even) /* same */

-- 
David Dorward                                      http://dorward.me.uk

Received on Tuesday, 8 August 2006 10:26:07 UTC