CSS3 :disabled selector
Complete CSS Selector Reference Manual
Example
Set the background color of all disabled input elements of type="text":
input[type="text"]:disabled
{
background:#dddddd;
}
Try it »
Definition and Usage
:disabled selector matches every disabled element (mainly form elements).
Browser support
The numbers in the table indicate the first browser version that supports this property.
| Selector | |||||
|---|---|---|---|---|---|
| :disabled | 4.0 | 9.0 | 3.5 | 3.2 | 9.6 |
More examples
Example
Set the background color for all disabled input elements:
input:disabled
{
background:#dddddd;
}
Try it »