开发者

Issue with disable button not looking disabled in Mozilla

We have asp.net button and we disable them based on user permission. Sample code is

btnSave.Enabled = false;

The button is disabled and hence non-c开发者_C百科lickable in IE. However in Mozilla the button looks enabled , though the user cannot click it.

Machine OS: Windows 7 IE version : 8.0 Mozilla version:Mozilla/5.0

Any workarounds or solution for this , or why is it behaving this way


you could use CSS to resolve this issue.

button[disabled] {
 background-color: #ddd;
/* Add CSS here for disable button look and feel*/
}


Yes this happens. To overcome this issue, you should write a CSS class and apply it when it is enable or disable. For Ex.

.enable
{
color:black;
}

.disable
{
color:#333333;
}


I asked this question a few months ago. You might find the responses useful: Is it Possible to Style a Disabled INPUT element with CSS?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜