HTML Style Question

Support, Discussion, Reviews
Post Reply
User avatar
Sylvus
Super Poster!
Super Poster!
Posts: 7033
Joined: July 10, 2002, 11:10 am
Gender: Male
XBL Gamertag: mp72
Location: A², MI
Contact:

HTML Style Question

Post by Sylvus »

I can't for the life of me find out how to change the font color on a disabled text input to look black. I know that you can change the color via the style attribute in the input tag, but setting it to black still looks light gray, by virtue of it being disabled. I have to imagine I'm just missing some sort of "background-tint" element or something.

Anyone have a good solution? For now I'm just using td's and making them look like an input field, but I'd like to actually use disabled inputs.

Thanks
"It's like these guys take pride in being ignorant." - Barack Obama

Go Blue!
cadalano
Way too much time!
Way too much time!
Posts: 1673
Joined: July 16, 2004, 11:02 am
Location: Royal Palm Beach, FL

Post by cadalano »

can you use the read only prop instead?

i would just use a div or something, though. why do you need them to be an input box? aesthetics?
I TOLD YOU ID SHOOT! BUT YOU DIDNT BELIEVE ME! WHY DIDNT YOU BELIEVE ME?
cadalano
Way too much time!
Way too much time!
Posts: 1673
Joined: July 16, 2004, 11:02 am
Location: Royal Palm Beach, FL

Post by cadalano »

btw- MSDN is the best HTML reference out there. If there is a simple style tag to solve the problem- it will be listed there (i found nothing). Its a fantastic place to have bookmarked

http://msdn.microsoft.com/library/defau ... ements.asp
I TOLD YOU ID SHOOT! BUT YOU DIDNT BELIEVE ME! WHY DIDNT YOU BELIEVE ME?
lmnt9
Gets Around
Gets Around
Posts: 178
Joined: November 16, 2006, 6:19 pm

Post by lmnt9 »

Code: Select all

input {
        font-family: Verdana, Arial;
        font-size: 10px;
        color: #000000;
}
This works in firefox 1.5.0.8, but not in IE v6. I don't have 7 to test. Maybe an IE limitation?
lmnt9
Gets Around
Gets Around
Posts: 178
Joined: November 16, 2006, 6:19 pm

Post by lmnt9 »

Seems like IE wont accept a font color change, but you can change the background color...
User avatar
Sylvus
Super Poster!
Super Poster!
Posts: 7033
Joined: July 10, 2002, 11:10 am
Gender: Male
XBL Gamertag: mp72
Location: A², MI
Contact:

Post by Sylvus »

Yeah, I was looking for font color change. Currently IE 6 is the main standard we have to code for, so for now I just avoided using disabled input boxes.

That wasn't my choice in the first place, one of the analysts wanted it to look like that. Oh well.
"It's like these guys take pride in being ignorant." - Barack Obama

Go Blue!
Post Reply