CSS3 :enabled Selector

Example

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

input[type="text"]:enabled
{
background:#ffff00;
}

Try it yourself »

Definition and Usage

The :enabled selector matches every enabled element (mostly used on form elements).


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The :enabled selector is supported in all major browsers, except Internet Explorer.


Examples

Try it Yourself - Examples


Example

Set a background color for all enabled input elements:

input:enabled
{
background:#ffff00;
}

Try it yourself »