---
title: "Comment by Emore Ogheneyoma Lawrence on \"CSS the :not() selector\" | Hashnode"
description: "very nice article Kars 👍"
url: "https://hashnode.com/posts/css-the-not-selector/61268f1122e1ba252a87deec/comment/6418d0ac6fd77cec7793b830"
---

[Discussion](https://hashnode.com/posts/css-the-not-selector/61268f1122e1ba252a87deec)

Comment [CSS the :not() selector](https://hashnode.com/posts/css-the-not-selector/61268f1122e1ba252a87deec)

[Emore Ogheneyoma Lawrence](https://hashnode.com/@Yoma)

[Mar 20, 2023](https://hashnode.com/posts/css-the-not-selector/61268f1122e1ba252a87deec/comment/6418d0ac6fd77cec7793b830)

very nice article Kars 👍

[Emore Ogheneyoma Lawrence](https://hashnode.com/@Yoma)

[Mar 20, 2023](https://hashnode.com/posts/css-the-not-selector/61268f1122e1ba252a87deec/comment/6418d0ac6fd77cec7793b830#reply-6418d2ae6fd77cec7793b85a)

I use the :not() pseudo-class mostly when I want to target the last or first elements in divs, be it a nav list or any normal list

.className:not(:last-child){} 🚀 to the rescue
