# :not()

Matches elements that don't match the selector inside.

## What does `:not()` do?

`:not()` matches elements that do not match the selector inside it.

```css
.menu li:not(:last-child) { border-right: 1px solid #ccc; }
```

Level: Freelancer · [More CSS terms at this level](https://www.ask-codey.com/glossary/subjects/css/freelancer)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/not
