Reputation: 38455
select:disabled {
background-color: #BBBBBB;
}
<select disabled>
<option>test</option>
</select>
If you run the code above on chrome and then check the background color of the select tag using a color picker you will get #CFCFCF
and not #BBBBBB
Doing the same on a tag works as expected, is this a bug in chrome or am I missing something?
Upvotes: 2
Views: 55
Reputation: 3249
disabled
changes the item's opacity. add opacity: 1;
select:disabled {
background: #BBBBBB;
opacity: 1;
}
<select disabled>
<option>test</option>
</select>
Upvotes: 2