Set a background color for all disabled input elements of type="text":
More "Try it Yourself" examples below.
The :disabled selector matches every disabled element (mostly used on form elements).
Version: | CSS3 |
---|
The numbers in the table specifies the first browser version that fully supports the selector.
Selector | |||||
---|---|---|---|---|---|
:disabled | 4.0 | 9.0 | 3.5 | 3.2 | 9.6 |
Set a background color for all disabled <input> elements:
Set a background color for all disabled <option> elements:
CSS Selector Reference: CSS :checked selector
CSS Selector Reference: CSS :enabled selector