Style every third element?
How can I style every third element with plain CSS.
:nth-child(third) doesn’t work neither does
Use the nth-child selector.1
Where ‘1’ is where the style starts, and 3 indicates that it should style every third element. It is explained much better here.
1Note - as other people have mentioned this is not fully supported by IE8 and down.