Forum Moderators: not2easy

Message Too Old, No Replies

table cell background color

         

skoff

10:40 pm on Nov 30, 2010 (gmt 0)

10+ Year Member



is there anyway in css to say that table line 1 3 5 7 9.... would be black and table line 2 4 6 8 10.... would be white? and on mouse over the table line could be blue?

nrobidoux

1:48 am on Dec 1, 2010 (gmt 0)

10+ Year Member



You'll have to assign different classes to odd and even rows. Then assign a ':hover' style to change the background on mouseover. So the styles you'll need are:

TD.odd {}
TD.odd:hover {}
TD.even {}
TD.even:hover {}

If you want to make it more specific class/id the table (or div containing the table) and place that before the above styles.