You are here: Home/CSS/ CSS Select every 2nd, 3rd element – even / odd
CSS Select every 2nd, 3rd element – even / odd
Select every 2nd element
li:nth-child(even){ }
li:nth-child(odd){ }
Select every 3rd element
li:nth-child(3n){ }
About Gabor Flamich
I'm a web developer and designer based in Budapest, Hungary. In recent years, I've documented hundreds of solutions I came across during development. This site is an archive for useful code snippets on WordPress, Genesis Framework and WooCommerce. If You have any questions related to WordPress development, get in touch!