CSS Solid

Pseudo-Class - :disabled

Selects disabled elements.

Example:


<!DOCTYPE html>
<html>
<head>
    <title> CSS pseudo-class selector - :disabled</title>
    <style>
        :disabled {
            background-color:lightgray;
        }
    </style>
</head>
<body>
    <div>
        <label>Code:</label>
        <input type="text" id="code"  value="10" disabled="disabled" />
    </div>

</body>
</html>

Result:

Above example, sets background color gray to the disabled input element.