Forum Moderators: not2easy

Message Too Old, No Replies

css to determine disabled input style

What is the best way to define a class on a disabled input?

         

broniusm

8:35 pm on Jun 20, 2003 (gmt 0)

10+ Year Member



Is there Any way to alter the default grey of an input when disabled in IE5.5+? The disabled text looks like a blurry mess on my special rounded buttons:

.bgbtn45, .bgbtn50 { /* more definitions as needed */
background:transparent; border:none; font-size:8pt;
background-repeat:no-repeat;
background-position:0; cursor:hand;
}

.bgbtn45 { background-image:url(/images/btnbg45.gif); width:45; }
.bgbtn50 { background-image:url(/images/btnbg50.gif); width:50; }

<input type="button" class="bgbtn50">

Basically, it's an image that acts like a button (presses like one and has a built-in label), and they look great. But when I disable it, not only does the text go grey, but it looks like a blurry mess with an imitation embossed blah appeal to it. How can I change that?..

DrDoc

9:02 pm on Jun 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



By not using the "disabled" attribute...
Disable it otherwise, or replace it with a normal button that doesn't "go" anywhere.

broniusm

9:21 pm on Jun 20, 2003 (gmt 0)

10+ Year Member



Doc, that's what I was afraid of hearing.. There is so much "disabled=true" code scattered throughout, coupled with XSLs whose inline-tests go ahead and set some stuff to grey, etc, imitating the default...

argh.

Does "UI WD" mean anything to anyone? (or me and this issue in IE)

This is from an email post online
Subject: UI WD sample style sheet

button[disabled], input[disabled],
optgroup[disabled], option[disabled],
select[disabled], textarea[disabled]
{
user-input:disabled;
}

drbrain

10:41 pm on Jun 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



broniusm: That's exactly what Mozilla does by default:

[lxr.mozilla.org...]