The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › [Solved] Nth of Type CSS Selection
How do I select the following using nth-of-type()?
nth-of-type()
big small small big big small small big ...
Not sure what you are trying to achieve.
If you have a concrete example it might be easier to help.
Remember though, the nth selectors only select elements not classes… and even then only within the same parent.
However, what I think you are asking, (after thinking about it)…is the pattern….which would be:
li:nth-of-type(4n), li:nth-of-type(4n+1) { /* your styles here */ }
http://codepen.io/Paulie-D/pen/mVEYoa
Hey Paulie_D, this is great!! Thanks for the simple soloution.