URL87
URL87

Reputation: 11012

not() for specific class

Suppose there is style for div and some more class's -

div, .exceptDiv, .bigDiv {
    /*style...*/
}

(here its jsFiddle),

and I want to save a class which stay clear from any style - clearDiv .

I tried -

div:not(".clearDiv"), .exceptDiv, .bigDiv {
    /*style...*/
}

(here its jsFiddle),

but it doesn't work .

I'm looking for a solution which use not(...) if it possible .

Upvotes: 0

Views: 27

Answers (1)

Adrian Preuss
Adrian Preuss

Reputation: 3113

Use not() correctly!

div:not(".clearDiv") is not valid, remove the quotes: div:not(.clearDiv)

http://jsfiddle.net/v4YDD/4/

Upvotes: 2

Related Questions