-2

I am trying to apply color:#000 on disabled textbox inwhich text is being displayed as part of the info. (problem: text appearing in textbox is faded default) Any suggestion??

please see this picture coming in ie9

2 Answers2

0

I think what the question is trying to say is that this:

<textarea disabled="disabled" style="color:#000  ;">Hello</textarea>
0

You should use the CSS attribute selector for better solution. Check out this example -

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Attribute Selector Example</title>
<style type="text/css">
    input[disabled]{
        color: #000;
        border: 1px solid #000;
    }
</style>
</head> 
<body>
    <form>
        <input type="text" disabled="disabled" value="Disabled Input">
    </form>
</body>
</html>

To know how attribute selector works you can check out this page - http://www.tutorialrepublic.com/css-tutorial/css-attribute-selectors.php

Also if you want to apply the style only in IE this page will be helpful to you - http://www.tutorialrepublic.com/faq/how-to-define-style-sheet-only-for-internet-explorer.php

Alex
  • 996
  • 2
  • 10
  • 17