W3C home > Mailing lists > Public > www-style@w3.org > March 2001

Re: pseudo-classes :odd and :even?

From: Ian Hickson <ian@hixie.ch>
Date: Sun, 4 Mar 2001 23:27:11 -0800 (Pacific Standard Time)
To: Steve Tinney <stinney@sas.upenn.edu>
cc: <www-style@w3.org>
Message-ID: <Pine.WNT.4.31.0103042323280.1160-100000@HIXIE.netscape.com>
On Mon, 5 Mar 2001, Steve Tinney wrote:

> I went to the CSS 3 description of selectors expecting to find a simple way
> of specifying alternate gray and white backgrounds for table rows; I don't
> see
> one.
>
> Am I missing something?  I think something like nth-child() which applied
> to alternate rows would be useful.

:nth-child(odd) and :nth-child(even) are what you are looking for.

-- 
Ian Hickson                                     )\     _. - ._.)       fL
Netscape, Standards Compliance QA              /. `- '  (  `--'
+1 650 937 6593                                `- , ) -  > ) \
irc.mozilla.org:Hixie _________________________  (.' \) (.' -' __________
Received on Monday, 5 March 2001 02:26:12 GMT

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