CSS3 :disabledSelectors
Complete CSS Selector Reference Manual
Example
Set the background color of all disabled input elements with type="text":
input[type="text"]:disabled
{
background:#dddddd;
}
{
background:#dddddd;
}
Try it Yourself »
Definition and Usage
The :disabled selector matches every disabled element (mainly used for form elements).
Browser Support
The numbers in the table indicate the first browser version number that supports the property.
| Selectors | |||||
|---|---|---|---|---|---|
| :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;
}
{
background:#dddddd;
}
Try it Yourself »
other extensions