Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 251
  • Last Modified:

how to change the color of the text that appears inside a disabled text box

can the text color of a disabled text box be changed to "RED" or any other color??
0
ramareddyj
Asked:
ramareddyj
5 Solutions
 
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
I think the first suggestion in the below link suits your requirement but yet a good link to refer.

http://www.experts-exchange.com/Web/Web_Languages/HTML/Q_21261155.html

and also check

http://www.thescripts.com/forum/thread98600.html
http://www.codecomments.com/archive298-2004-8-259870.html
0
 
anumalasCommented:
Hi

please refer the following question its very simple....
using CSS

http://www.experts-exchange.com/Web/Web_Languages/CSS/Q_21891179.html?qid=21891179
0
 
muktajindalCommented:
For textbox color change, you can define two separate classes for active and disabled textboxes in your CSS file. Create textboxes with the active class. Whenever you want to disable a textbox, just change the class associated with that textbox. You should get the desired results.
0
 
MeritorCommented:
If you are using IE then its hard to set color for disabled text box but in Mozilla/Netscape you can write the following code:
input[disabled] {color:red!important;}

As in:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title> New Document </title>
<style type="text/css">
input {
color: green;
}
input[disabled] {color:red!important;}
</style>

</head>

<body>
<form>
<input type="text" disabled value="disabled"></input><br>
<input type="text" value="normal"></input>
</form>
</body>
</html>
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now