Click here to Skip to main content
16,017,638 members
Please Sign up or sign in to vote.
2.60/5 (2 votes)
See more:
.input-disabled {
/*background-color: #e6e6e6;
pointer-events: none;
cursor: not-allowed;*/
background: #eee;
pointer-events: none;
cursor:no-drop;

}

I am using this is ..this is working in all browser but Internet Explorer not working.Textbox disabled but dropdown not disabled.Please tell idea
Posted
Comments
ZurdoDev 24-Jul-15 11:11am    
Are you actually disabling the dropdown or just applying CSS to make it look disabled?

Use jquery to disable.

1 solution

CSS itself cannot disable an HTML tag. You need to set the HTML tag to disabled ro readonly. To style an input tag, please see below.

HTML
<html>
<head>
<title>Disable Textbox</title>
<style>
.read[readonly], .disa[disabled] {color: #fff; background-color: #666;}
</style>
</head>

<body>
<form>
<input type="text" class="disa" disabled />
<input type="text" class="disa" />
<input type="text" disabled />
<input type="text" class="read" readonly>
</form>
</body>
</html>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900