CSS3 :not Selector

Example

Set a background color for all elements that are not a p element:

:not(p)
{
background:#ff0000;
}

Try it yourself »

Definition and Usage

The :not(selector) selector matches every element that is NOT the specified element/selector.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The :not selector is not supported in any of the major browsers.