156 of 313 menu

The disabled pseudo-class

The disabled pseudo-class specifies styles for an inactive input. By inactive we mean the input that is given the disabled attribute.

Syntax

input:disabled { }

Example

Let's apply styles to the inactive input:

<input> <input disabled> input:disabled { border: 1px solid red; box-shadow: 0 0 3px red; }

:

See also

  • the enabled pseudo-class
    that sets styles for an active input
byenru