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;
}

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

Examples

More Examples


Example

Set the background color for all disabled input elements:

input:disabled
{
background:#dddddd;
}

Try it Yourself »


Complete CSS Selector Reference Manual

other extensions