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

Leave a Comment

Name:

E-mail:

Website:

Comment:

Recent Comments

  • Josir Gomes: Hi Steve, the meta-package ubuntu-desktop is bloated with huge softwares like OpenOffice, Evolution,...
  • hannah: your that good! ha ha, but seriously.
  • Wiras Adi: Yeah, mathematic operation in text-based CAPTCHA is very easy to break. And I don't think that many sites...
  • Gary: Phew! You saved me lots of hassle :-) The only problem I had was that $_SERVER[’HTTP_AUTHORIZATION ’]...
  • Stephen: To touch on the issue Vinay raised, I had to use the -wholename option on the find command to delete files...

Else wheres