Forum Moderators: not2easy

Message Too Old, No Replies

Adding styles to disabeled form elements

         

Emmis

2:27 pm on May 6, 2003 (gmt 0)

10+ Year Member



After some extensive research and testing I've still not figured out how to add a style for instance to a disabled text-field. I want the text to be red and bold. I understand that there is a pseudo-element called :disabled, but it seems like this exists exclusively in CSS3. But trying something like this .form:disabled{ color:red;} won't work. Am I missing something or is this unusual to want to change?

Emma

drbrain

3:36 pm on May 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



CSS2 Attribute Selector [w3.org] is what you're looking for:

input[disabled] { color: red; }

(This is not supported by IE)

Emmis

8:05 am on May 7, 2003 (gmt 0)

10+ Year Member



Thanx a bunch! :) But is there no way to make this work in IE?