How Do :Nth-Child() and Nth-of-Type Really Work?

wesbos.com / filed under HTML & CSS

I get this question a lot so I thought I’d make a quick video. When you have a list of items, nth-child() and nth-of-type may not do exactly what you think they do. Check this quick video for some clarity. Enjoy!

Subscribe to newsletter

Design and frontend links delivered to your inbox every day and week. No spam, unsubscribe at anytime.

Choose frequency

Permission