O'Reilly logo

CSS Pocket Reference, 4th Edition by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

:disabled

Applies to:

Any element

Description:

Matches user interface elements that are not able to accept user input because of language attributes or other nonpresentational means; for example, <input type="text" disabled> in HTML5. Note that :disabled does not apply when an input element has simply been removed from the viewport with properties like position or display.

Examples:

input:disabled {opacity: 0.5;}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required