Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Change the Disabled Textbox/Textarea Text Color

New Here ,
Mar 17, 2008 Mar 17, 2008

Copy link to clipboard

Copied

I am in need to know how to change the text color from Grey once a Textbox/Textarea has been disabled. Any help is greatly appreciated.
Thanks.
TOPICS
Server side applications

Views

3.3K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 17, 2008 Mar 17, 2008

Copy link to clipboard

Copied

MBaron007 wrote:
> I am in need to know how to change the text color from Grey once a Textbox/Textarea has been disabled. Any help is greatly appreciated.
> Thanks.

I don't think you can, this is a function of the browser/OS.
Mick

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 17, 2008 Mar 17, 2008

Copy link to clipboard

Copied

I was told by Dreamweaver support that it could possibly be done using CSS.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 17, 2008 Mar 17, 2008

Copy link to clipboard

Copied

>I was told by Dreamweaver support that it could possibly be done using CSS.

That's a standard reply to these kinds of questions.

However I'm not 100% clear on exactly what you're asking. Can you explain
some more?

--
Regards

John Waller


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 17, 2008 Mar 17, 2008

Copy link to clipboard

Copied

The standard text color of a disabled textbox/textarea is grey and I would like to change that color to black. The form will be printed and the grey text is not sufficient for my companies needs.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 17, 2008 Mar 17, 2008

Copy link to clipboard

Copied

It's not a user/browser configurable color. Sorry.


--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"MBaron007" <webforumsuser@macromedia.com> wrote in message
news:frmdhq$761$1@forums.macromedia.com...
> The standard text color of a disabled textbox/textarea is grey and I would
> like to change that color to black. The form will be printed and the grey
> text is not sufficient for my companies needs.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 17, 2008 Mar 17, 2008

Copy link to clipboard

Copied

Murray *ACE* wrote:
> It's not a user/browser configurable color. Sorry.

Sorry to disappoint you, but it is - at least in modern browsers. See my
other post.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 17, 2008 Mar 17, 2008

Copy link to clipboard

Copied

John Waller wrote:
>> I was told by Dreamweaver support that it could possibly be done using CSS.
>
> That's a standard reply to these kinds of questions.

It also happens to be correct on this occasion. The following works in
Firefox and IE7 (haven't tested other browsers):

input[disabled] {
background-color: #f00;
}

This rule turns the background colour to red when an input field is
disabled. It uses an attribute selector, which modern browsers now support.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 17, 2008 Mar 17, 2008

Copy link to clipboard

Copied

David,

I need the Text color to change and not the background color. I have tryed the following CSS with no luck:
.disabledcolor {color: #000000}

Here is my code:

<textarea name="Goal1" disabled="disabled" class="disabledcolor" id="Goal1" style="width:425px" dojotype="dijit.form.Textarea" ><%=(Goals.Fields.Item("Goal1").Value)%></textarea>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 17, 2008 Mar 17, 2008

Copy link to clipboard

Copied

LATEST
MBaron007 wrote:
> I need the Text color to change and not the background color. I have tryed
> the following CSS with no luck:
> .disabledcolor {color: #000000}
>
> Here is my code:
>
> <textarea name="Goal1" disabled="disabled" class="disabledcolor" id="Goal1"
> style="width:425px" dojotype="dijit.form.Textarea"
>> <%=(Goals.Fields.Item("Goal1").Value)%></textarea>

Unless the text on your page is a different colour from black, you won't
notice any change. The following style rule changes the colour in a
disabled text area to red (adjust it to your needs):

textarea[disabled] {
color:#f00;
}

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 17, 2008 Mar 17, 2008

Copy link to clipboard

Copied

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 17, 2008 Mar 17, 2008

Copy link to clipboard

Copied

Oh, you might want to just target the print media in your css so it only applies to printouts and not web pages.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines