CSS selector for disabled input type = "submit"

Is there a CSS selector for disabled input type="submit" or "button" ?

Should I just use input[type="submit"][disabled] ?

Does it work in IE6?

+58
css css-selectors submit-button
Sep 21 '10 at 11:09
source share
2 answers

Does it work in IE6?

No, IE6 does not support attribute selectors in general, cf. CSS and Internet Explorer compatibility .

You can find a workaround: IE6 does not support the CSS attribute selector that is worth reading.




EDIT
If you ignore IE6, you can do (CSS2.1):

 input[type=submit][disabled=disabled], button[disabled=disabled] { ... } 

CSS3 (IE9 +):

 input[type=submit]:disabled, button:disabled { ... } 

You can replace [disabled=disabled] (attribute value) with [disabled] (attribute presence).

+94
Sep 21 '10 at 11:11
source share

As jensgram says, IE6 does not support attribute selector. You can add class = "disabled" to select disabled inputs so that it can work in IE6.

+1
21 Sep '10 at 11:13
source share



All Articles