Solved

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

Posted on 2006-07-07
7
241 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
7 Comments
 
LVL 8

Accepted Solution

by:
stmani2005 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Some of the SEO trends we might expect in 2017.
Starting your own business is always a daunting process, and for most people it is brand new experience. Avoid the common pitfalls by following these tips to start on the road to success.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

809 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