ptrcao
12-11-2010, 06:53 PM
For example, question has been posed elsewhere on the web:
http://stackoverflow.com/questions/358350/alternate-background-colors-for-list-items
I know I can manually assign classes or ids, but that's not satisfactory because the list will be dynamic and changing and i don't want to have to go thru and manually change the classes everytime a new item is inserted in which disrupts the alternating pattern. moreover it's a very long list...
As for JQuery, another suggestion in the forum in the link, I'm still a html css learner, with no JavaScript knowledge, so unless you can give me a crash course in JavaScript better scrap that idea.
Bottom line, I want or more efficient, or automated solution to alternating background colors for list items.
If you're wondering it's for the vertical menus on my site: http://www.mathannotated.com/ so that alternating links can be easily discerned from ea. other.
http://stackoverflow.com/questions/358350/alternate-background-colors-for-list-items
I know I can manually assign classes or ids, but that's not satisfactory because the list will be dynamic and changing and i don't want to have to go thru and manually change the classes everytime a new item is inserted in which disrupts the alternating pattern. moreover it's a very long list...
As for JQuery, another suggestion in the forum in the link, I'm still a html css learner, with no JavaScript knowledge, so unless you can give me a crash course in JavaScript better scrap that idea.
Bottom line, I want or more efficient, or automated solution to alternating background colors for list items.
If you're wondering it's for the vertical menus on my site: http://www.mathannotated.com/ so that alternating links can be easily discerned from ea. other.