---
title: "Discussion on \"Using the CSS :not() pseudo-class\" | Hashnode"
description: "Discussion on \"Using the CSS :not() pseudo-class\". Unleashing the Power of CSS :not() - Select What You Want, Exclude What You Don't!"
url: "https://hashnode.com/posts/using-the-css-not-pseudo-class/642beab27f9f2fae769b70d6"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Using the CSS :not() pseudo-class](https://devyoma.hashnode.dev/using-the-css-not-pseudo-class?utm_source=hashnode&utm_medium=feed)

Unleashing the Power of CSS :not() - Select What You Want, Exclude What You Don't!

Apr 4, 2023 · 5 min read · devyoma.hashnode.dev  
Read the article

-   [#frontend-development](https://hashnode.com/tag/frontend-development)
-   [#css](https://hashnode.com/tag/css)

## Written by

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

@Yoma · Nigeria

  
[View profile](https://hashnode.com/@Yoma)

FrontEnd React JS Developer || Open Source Lover || Building Products

FrontEnd React JS Developer || Open Source Lover || Building Products

## Responses 1

Markdown supported · ⌘↵ to post

[Gemma Black](https://hashnode.com/@GemmaBlack)

[Apr 7, 2023](https://hashnode.com/posts/using-the-css-not-pseudo-class/642beab27f9f2fae769b70d6/comment/643006157d188b3a2bde93ad)

I didn't know about chaining:not, but that does look more readable. Thanks for the tip:

```
:not(.foo, .bar){
     border: 2px solid red;
 }
```

And the use case for first and last elements is actually one I would definitely have a use for 👍

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

[Apr 9, 2023](https://hashnode.com/posts/using-the-css-not-pseudo-class/642beab27f9f2fae769b70d6/comment/643006157d188b3a2bde93ad#reply-6432de4894d1164842d9c0ba)

I am glad this article helped you. Thank you for reading too 😊
