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??
Asked
Active
Viewed 26 times
-2
-
Add a picture to make your example easier to get. – kwoxer Mar 29 '16 at 06:54
-
hi, please check the picture – Suresh Sharma Mar 29 '16 at 07:12
-
Possible duplicate of [How to change color of disabled html controls in IE8 using css](http://stackoverflow.com/questions/1411044/how-to-change-color-of-disabled-html-controls-in-ie8-using-css) – Vucko Mar 29 '16 at 07:20
2 Answers
0
I think what the question is trying to say is that this:
<textarea disabled="disabled" style="color:#000 ;">Hello</textarea>

Dilshan Perera
- 132
- 11
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