1

I would like to know if it's possible to force a CSS Color on a "disabled=true" textbox? By default, this attribute is removing the css font color and replacing it by a very light gray.

Thanks

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
Roch
  • 21,741
  • 29
  • 77
  • 120

2 Answers2

2
input[disabled='disabled'] {
  color:blue;
  }

source

ArK
  • 20,698
  • 67
  • 109
  • 136
  • @sisdog try this http://stackoverflow.com/questions/5485642/how-do-you-style-disabled-textarea-in-ie8 and http://stackoverflow.com/questions/1411044/how-to-change-color-of-disabled-html-controls-in-ie8-using-css – ArK Jul 28 '11 at 08:45
0

I found the problem with just using input[disabled='disabled'] was that it also includes checkboxes and radio buttons which I didn't want to handle quite the same way. I found the following method worked for me...

INPUT[type=text][Disabled],
INPUT[type=search][Disabled],
INPUT[type=password][Disabled],
SELECT[Disabled] { color:blue;}
Adam Youngers
  • 6,421
  • 7
  • 38
  • 50