Solved

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

Posted on 2006-07-07
7
243 Views
Last Modified: 2010-05-18
can the text color of a disabled text box be changed to "RED" or any other color??
0
Comment
Question by:ramareddyj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 9

Accepted Solution

by:
Manikandan Thiagarajan earned 100 total points
ID: 17064491
0
 
LVL 23

Assisted Solution

by:Siva Prasanna Kumar
Siva Prasanna Kumar earned 100 total points
ID: 17067206
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
 
LVL 3

Assisted Solution

by:anumalas
anumalas earned 100 total points
ID: 17070778
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
 
LVL 5

Assisted Solution

by:muktajindal
muktajindal earned 100 total points
ID: 17071825
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
 
LVL 4

Assisted Solution

by:Meritor
Meritor earned 100 total points
ID: 17073590
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popular third-party chat platforms like Slack, Discord, and Telegram are just a few of the many new productivity applications that are being hijacked by cybercriminals to create command-and-control (C&C) communications infrastructures for their malw…
This article outlines some of the reasons why an email message gets flagged as spam on a recipient's end.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question