disabled Selector
CSS disabled Selector reference
The CSS disabled UI element states selector ( X:disabled { } ) is used to target and style disabled HTML form input elements. Where applicable form input elements are set to "disabled" they will receive your specified style properties.
In the code example above we are using the Universal Selector together with the Disabled Selector to style any and all elements that happened to be set as disabled in the document.
CSS CODE EXAMPLE
<!DOCTYPE html>
<style type="text/css">
*:disabled {
background-color:#EEECDF;
border:#999 1px dashed;
}
</style>
<input type="text" name="firstname" disabled="disabled">
<br /><br />
<textarea name="comment" disabled="disabled"></textarea>
<style type="text/css">
*:disabled {
background-color:#EEECDF;
border:#999 1px dashed;
}
</style>
<input type="text" name="firstname" disabled="disabled">
<br /><br />
<textarea name="comment" disabled="disabled"></textarea>
0 Response to "disabled Selector"
Post a Comment