Topic: Zebra Pattern using CSS |
|
---|---|
Author | Thread |
Bipolar (III) Inmate From: Aiur, the Tarsonian Galaxy |
posted 05-18-2004 10:33
I've been trying to make one of those zebra like patterns in CSS but the problem is that the only way I found out how to do it is by adding a different class to each of the <li> elements. Thats pretty hectic does anyone know of a better or easier way to do it? |
Bipolar (III) Inmate From: Cold Sweden |
posted 05-18-2004 10:46
In current CSS specs, you can't construct a selector that selects every other <li>. In CSS 3, you will probably be able to do something like code: li:nth-child(odd) . |
Paranoid (IV) Inmate From: France |
posted 05-18-2004 10:51 |
Maniac (V) Inmate From: Kah-lee-fohr-nee-ah |
posted 05-20-2004 20:46
The CSS3 :nth-child selector that HZR referred to has actually been implemented in Firefox nightlies sometime after 0.8. Another reason why I love Fx. |