On 28/10/06, Fred Janon <[EMAIL PROTECTED]> wrote: > How to get alternating row colors in a table or a list?
Add classes > I know of solutions with Javascript Generally they just do the heavy lifting of adding classes for you. > 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). You're a bit stuck then > Now that we have CSS 2.1, Still a draft > with "counter" and Which has been in CSS 2 since '98, but just counts. It doesn't let you do: if (value_of_counter %2 ) > "content", Which adds *content* (and ditto on the CSS 2) > does anyone have an idea? CSS 3 has proposals that will let you match alternate rows and the like, but its quite a long way off still. -- David Dorward <http://dorward.me.uk><http://blog.dorward.me.uk> ______________________________________________________________________ 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/
