View Full Version : Styling a disabled input
daemonkin
08-10-2007, 03:33 PM
Just wondering if it is possible to add a lighter shade of disabled to an input field or is this not possible / not browser compatible?
D.
koyama
08-11-2007, 03:21 PM
Just wondering if it is possible to add a lighter shade of disabled to an input field or is this not possible / not browser compatible?
Ideally, you would use attribute selection:
input[disabled] {
background: green;
}
<input type="text" disabled="disabled">
IE6 does not support attribute selection, so if you require IE6 support then you have will have to find another method. For example, give it a class name:
.disabled {
background: green;
}
<input type="text" class="disabled" disabled="disabled">
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.