How can I style every third element with plain CSS.
I have seen questions like this, but they involve javascript. I want a plain CSS solution. I know I can use
section > div:nth-child(3n+1) { background:red; }
This style is good for fixing your problem, but '>' this symbol, isn't supported for old browsers, for example: IE5, IE6, IE7 . . .
But I prefer this way, without '>' symbol
section div:nth-child(3n+1) { background:red; }