Get a free trial // Grow your CSS skills // Land your dream job

How to change rows color in tables

  • # February 2, 2013 at 10:53 am


    Is there any way to use 2 different color for tables rows:

    row1: color1
    and …

    notice that I want to do this without adding any classes to rows for color1 or 2.

    # February 2, 2013 at 11:21 am

    tr:nth-child(even) or (odd) or (2n)

    # February 2, 2013 at 12:09 pm


    # February 2, 2013 at 12:27 pm

    Thanks you very much.

    It really works very well!!!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed