Browsing articles from "June, 2010"
Jun
22

Alternating row colours (zebra striping)

By Sam  //  All browsers, CSS 3.0  //  No Comments

If you’re looking for a quick and easy way to do pure CSS zebra striping the following code snippet will alternate row colours for you in browsers that support CSS3.

tbody tr:nth-child(odd){
    background-color:#ddd;
    }

Sponsored links