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

CSS3 :enabled selector

CSS3 :enabled selector

Complete CSS SelectorComplete CSS Selector Reference Manual

Example

Set the background color of all enabled input elements of type="text":

input[type="text"]:enabled

{

background:#ffff00;

}

Try it »


Definition and Usage

:enabled selector matches every enabled element (mainly form elements).


Browser support

The numbers in the table indicate the first browser version that supports this property.

Selector
:enabled 4.0 9.0 3.5 3.2 9.6

More examples

Example

Set the background color for all enabled input elements:

input:enabled

{

background:#ffff00;

}

Try it »


Complete CSS SelectorComplete CSS Selector Reference Manual