bushdiver
bushdiver

Reputation: 771

CSS declaration override

#header {
   width:100%;
   height:200px;
}

#theme.theme1 .handle {
   background:blue; 
} 

#header.noback { 
   background:none;   
}

why doesn't the last declaration override here ?

http://jsfiddle.net/5VnAs

Upvotes: 1

Views: 298

Answers (1)

j08691
j08691

Reputation: 207901

This is due to CSS specificity. If you change the last rule to

#header.noback.handle{ 
   background:none;   
}

jsFiddle example

it works

Upvotes: 2

Related Questions