PDA

Click to See Complete Forum and Search --> : CSS or JS: background-color of disabled textbox.


sinewaves
Sep 10th, 2002, 01:53 PM
any way to change the background color of a textbox depending on whether it is enabled or disabled?

Any advice would be great...

Rick Bull
Sep 10th, 2002, 05:19 PM
You should be able to do it like this:

input[type="input"] {
background:black;
color:white;
}
input[disabled][type="input"] {
background:blue;
color:black;
}

But I think once again IE doesn't support it, so you may have to do it via JS for IE.