2

I am trying to figure out if there is a way to change the text color of a disabled button in IE. With below code ,the text color is appropriate in Firefox/Chrome but no effect in IE :

<html>
<head>
<style>
button[disabled] {
    color:#933;
}
</style>
</head>
<body>
<button type="submit" disabled="disabled">Sample Button</button>
</body>
</html>

Any suggestions what might be wrong here or any alternate ways to do it will be helpful.

tshepang
  • 12,111
  • 21
  • 91
  • 136
user2418343
  • 21
  • 1
  • 2
  • Check this may be it'll help you to Change Color of Disable http://stackoverflow.com/questions/6186989/how-to-change-font-color-for-disabled-input – Faiqa Feb 14 '14 at 05:11
  • use the ie css with the \0/ or with * like color:red\0/; or *color:red; and which version of ie useing let me know – Vikas Gautam Feb 14 '14 at 05:20

3 Answers3

2

or you can try this piece of code of javascript

 $('input:button[disabled=true],input:submit[disabled=true]').each(function() {  
            $(this).addClass("commandExButtonDisabled");  
        }); 
Faiqa
  • 155
  • 11
2

please use this CSS Code.

input[type='button']:disabled, button:disabled
{
    color:#933;
    text-decoration:underline;
}

Regards, Kheema

Kheema Pandey
  • 9,977
  • 4
  • 25
  • 26
1

The IE text color for the disabled button can’t be changed. You can wrap into another element or change the background or the border.

Nanuz
  • 76
  • 1
  • 3