Styling Readonly and Disabled Inputs in Forms using CSS.
No preamble needed…
Readonly:
*[readonly] { /* CSS for all nodes with readonly attribute */ } input[readonly] { /* CSS for input nodes with readonly attribute */ } textarea[readonly] { /* CSS for textarea nodes with readonly attribute */ } select[readonly] { /* CSS for select nodes with readonly attribute */ }
Disabled:
*[disabled] { /* CSS for all nodes with disabled attribute */ } input[disabled] { /* CSS for input nodes with disabled attribute */ } textarea[disabled] { /* CSS for textarea nodes with disabled attribute */ } select[disabled] { /* CSS for select nodes with disabled attribute */ }
Notes:
Works with:
readonly=”[anything]”
readonly
disabled=”[anything]”
disabled
Steven
