CSS Tutorial

CSS Style

CSS Layout Style

CSS Float Style

CSS Reference

CSS enabled Selector (:enabled)


What is :enabled Selector?

CSS :enabled selector select all <input> element whose are enabled state.

Browser Compatibility

  • Google Chrome 2+
  • Mozilla Firefox 1.5+
  • Internet Explorer 9+
  • Opera 9.2+
  • Safari 3.1+

Note: Here details of browser compatibility with version number may be this is bug and not supported. But recommended to always use latest Web browser.

Syntax

General syntax of :enabled selector,

:disabled {
	property: value;
	property: value;
	...
}

input:disabled {
	property: value;
	property: value;
	...
}

Example:

CSS :enabled selector select all <input> element whose are enabled state.

<style type="text/css">
    input:enabled{
        background-color: yellow;
    }
</style>
</head>
<body>
    <input type="text" name="username" placeholder="Username" />
</body>

Run it...   »

Example Result: