user2418343
user2418343

Reputation: 21

How to change Text color of a disabled button in IE?

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.

Upvotes: 2

Views: 4435

Answers (3)

Nanuz
Nanuz

Reputation: 86

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.

Upvotes: 1

Kheema Pandey
Kheema Pandey

Reputation: 10265

please use this CSS Code.

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

Regards, Kheema

Upvotes: 2

Faiqa
Faiqa

Reputation: 155

or you can try this piece of code of javascript

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

Upvotes: 2

Related Questions