Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

CSS3 :disabled selector

CSS3 :disabled selector

Complete CSS SelectorComplete 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 »


Complete CSS SelectorComplete CSS Selector Reference Manual