I have 12 divs.
I need to select the ones marked THIS. I was thinking some sort of nth child magic?
Thanks!
ie.
<div class="feature"></div>
<div class="feature"></div> -> THIS
<div class="feature"></div>
<div class="feature"></div>
<div class="feature"></div> -> THIS
<div class="feature"></div>
<div class="feature"></div>
<div class="feature"></div> -> THIS
<div class="feature"></div>
<div class="feature"></div>
<div class="feature"></div> -> THIS
<div class="feature"></div>
You can use the nth-child pseudo-selector with a number expression:
3n+2means every third row starting with the second row.By the way, the link at SitePoint says that all modern browsers except IE8 support have full support. IE9 has full support, but make sure you are not in compatibility mode.