Reputation: 21
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
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
Reputation: 10265
please use this CSS Code.
input[type='button']:disabled, button:disabled
{
color:#933;
text-decoration:underline;
}
Regards, Kheema
Upvotes: 2
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