On 28/10/06, Fred Janon <[EMAIL PROTECTED]> wrote:
>
> How to get alternating row colors in a table or a list?
>
> I know of solutions with Javascript but I am looking for something that
> would be done with CSS only, I don't want to have to have a class for
> the even rows (or odd). Now that we have CSS 2.1, with "counter" and
> "content", does anyone have an idea?
>
> Thanks
>
> Fred


Hi,

CSS3 adds support for this using the nth-child selector, but there is close
to no support for this so it is useless at the moment. Counter is not
supported well enough either, so it's not reliable to use yet. Short of
adding a class (which is how people generally go about this) or using
javascript, there is not much else you can do.

Why don't you want to add a class to the even/odd rows?

Rafael
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to