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
Don't use nth-child, use nth-of-type
div.container > div:nth-of-type(odd) {
background: #e0e0e0;
}
.container {
width: 600px;
margin: 0 auto;
}
.row {
line-height: 24pt;
border: solid 1px black;
}
div.container>div:nth-of-type(odd) {
background: #e0e0e0;
}
h3 {
line-height: 36pt;
font-weight: bold;
color: blue;
}
Title
Content
Content
Content
Content
Title
Content
Content
Title
Content
Content
Content
Content
Content
Title
Content
Content
Content
Content