Click to See Complete Forum and Search --> : Styling a Table


1234567890
11-11-2008, 09:49 PM
Great example here. Scroll down to see the example table:

http://www.workingwith.me.uk/articles/scripting/standardista_table_sorting

I want to have every other entry in my column to have a color. So the first entry would be white, the second blue, the third white, the fourth blue, etc.

How can I do this via CSS? It looks simply, I would love to learn this!

skywalker2208
11-11-2008, 10:18 PM
In that example they have one row with class="odd" and the other row doesn't have a class. So you would need to have one table row with no class or a class called even and then the next row class called odd then the next row would be even again. So on and so forth. Then you have the need styles for each class.