Mr Lister
Mr Lister

Reputation: 46599

Styling disabled <select> elements

Is there a trick to giving disabled (read-only) select elements a css style?
I tried

 select[disabled] {color:#F00 !important}

(or variants using a class, !important etc) but that doesn't work in Chrome and IE. It does work in Firefox, but I'm looking for a universal solution.

Upvotes: 0

Views: 831

Answers (1)

sethasaurus
sethasaurus

Reputation: 142

Try input[disabled="disabled"]... it might be buggy http://reference.sitepoint.com/css/attributeselector

You could also just add a class to the disabled selector

Upvotes: 1

Related Questions