How to change color of disabled html controls in IE8 using css

Viewed 79240

I'm trying to change the color of input controls when they are disabled using the following css.

input[disabled='disabled']{
  color: #666;     
}

This works in most browsers, but not IE. I'm able to change any of the other style properties such as background-color, border-color, etc... just not color. Can anyone explain this?

17 Answers

Remove disabled attribute and use readonly attribute. Write required CSS for achieving the required result. This works in IE8 and IE9.

for e.g., for dark grey,

 input[readonly]{
   color: #333333;     
 }

The problem is solved in IE11. If the problem still persists in IE11, check for the rendering engine IE is using.

Related