The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Weird issue with nth-child
I’ve used nth-child many times, but here it’s behaving strangely:
http://www.redkitecreative.com/dev/dantal/blog/page/2/
I want every 3rd post to have 0 right margin so they are in columns of 3:
http://codepen.io/kanjigirl/pen/GZbMBQ
But in the WordPress loop it’s starting with the 2nd article, not the third one. What am I missing here?
Probably because the first child is a header, try nth-of-type instead.
header
nth-of-type
try this
article:nth-of-typ(3n) { margin: 0 0 20px; }
Yeah, but with an e after typ like I already stated.
Thanks, I knew it would be something obvious…