DEV Community

CSS only-child

Samantha Ming on June 10, 2019

We have first-child, last-child, and nth-child. What if you're the only child. Not everyone has siblings, you know! No worries, CSS got you cover...
Collapse
 
kioviensis profile image
Max Tarsis

Great explanation
Thank you

Collapse
 
samanthaming profile image
Samantha Ming

Glad it made sense to you! Thanks for reading ๐Ÿ‘๐Ÿ‘

Collapse
 
brob profile image
Bryan Robinson

I love all the new selectors in CSS. :only-child can be super handy to change layouts in Flex depending on content which is super handy.

Great write up!

Collapse
 
samanthaming profile image
Samantha Ming

Totally! Thanks for reading ๐Ÿ˜Š

Collapse
 
elliot profile image
Elliot

Nice intro to only-child :) I really like the community input section. Love to see people getting involved and interested!

Collapse
 
samanthaming profile image
Samantha Ming

This is my favorite part too! Itโ€™s great when people leave comments because itโ€™s such a great way to exchange knowledge. The best is when other folks chime in and help address the questions. Such a wonderful and generous community, super awesome ๐Ÿ˜Š๐Ÿ’›