Solved

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

Posted on 2006-07-07
7
239 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
In this blog, I will share you some basic tips for content marketing and to rank your website on Google.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now