W3C home > Mailing lists > Public > www-style@w3.org > August 2006

Re: idea about pseudo-selectors

From: David Dorward <david@dorward.me.uk>
Date: Tue, 8 Aug 2006 11:25:56 +0100
To: Ming Teo <ming@staff.highway1.com.au>
Cc: www-style@w3.org
Message-ID: <20060808102556.GC29017@us-lot.org>

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.


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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:46 GMT