Search code examples
csshtml-tablealternate

Table with alternate colors and tr rounded corners


I need to create a table that has both alternate and rounded TR corners, managed to create the tr corners using something like this http://jsfiddle.net/tXa53/

but now I cannot create the alternate part is there a jQuery script or something that will work?


Solution

  • Working only with css:

    http://jsfiddle.net/tXa53/3/

    I just added:

    .newHardware tr:nth-of-type(2n) td{
         background:#777;
    }
    

    you could as well use nth-child or nth-of-type(even|odd)