Home  »  CodeSnippets   »   Selecting not Last Child in CSS

Selecting not Last Child in CSS

Posted: February 7, 2022 | by Site Host

:not(:last-child)

Select last li in a ul:

li:not(:last-child) { 
 margin-bottom: 20px
} 

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.

Share it!

See also  CSS Blur Text Examples