I\'m trying to zebra stripe my divs in my website, sounds simple enough, however I\'ve found that when I added a header in between the rows of my divs it seems to count the
The easiest solution is of course just to wrap the elements you want striped.
Your updated jsFiddle.
HTML
Title
Content
Content
Title
Content
Content
Content
Title
Content
Content
Content
Content
CSS
.row:nth-child(odd) {background: #e0e0e0;}
Bear in mind also that if browser support is important to you, you might want to generate additional classes for zebra-striping server side instead.