The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Even & Odd Table Row Colours

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #24656

    I was hoping someone might have a solution to creating Even and Odd background colours to table rows. The data would be coming from a database. I was hoping for an all CSS solution, but am really open to anything. I read something about tr:nth-child but it doesn’t seem to work in IE.

    Any help would be greatly appreciated.


    its hard to tell it that way you have to send your table structure which you want to fetch from database


    thank you all. I’m going to give these suggestions a try.

    Take Care

    Chris Coyier

    Yeah it’s trivially easy with something like jQuery…

    You can use a selector like $("td:odd")



    Then apply styling for the odd rows in your CSS.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.