I'm currently working on a responsive layout made up of a grid of images.
It starts @ 1200px with a 3 column grid using nth:child(3n+0) - That works just fine.
But, as my layout shrinks to a 2column grid– the grid refuses to accept the new nth:child(even) rule. I've checked my css 100 times. Is this a thing? I can't seem to find anything around the interwebs.
Code below - I'd post a link, but I'm working locally :-/
It is currently working as expected, you just have to keep in mind that one won't override the other, so you will have to manually do that. Here is an example: http://jsfiddle.net/joshnh/qGBjM/
Also, you can simply write nth-child(3n) and nth-child(2n), both of which will do the same as what you have written above, but with less characters.
It starts @ 1200px with a 3 column grid using nth:child(3n+0) - That works just fine.
But, as my layout shrinks to a 2column grid– the grid refuses to accept the new nth:child(even) rule.
I've checked my css 100 times. Is this a thing? I can't seem to find anything around the interwebs.
Code below - I'd post a link, but I'm working locally :-/
Also, you can simply write
nth-child(3n)andnth-child(2n), both of which will do the same as what you have written above, but with less characters.