Legionar Legionar - 1 year ago 98
CSS Question

CSS selector for not having classes

I am using selector to select all elements not having one class:

.list th:not(.foo) {
/* some rules */

How I can apply this to more classes?

.list th:not(.foo), .list th:not(.bar) {
/* some rules */

The CSS above of course will not do that, I need something like this pseudo:

.list th:not(.foo and .bar)

Is it possible in CSS?

Answer Source

You can use as many :not() selectors as you like.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download