Kris Selbekk
Kris Selbekk

Reputation: 7634

Change disabled input text text color in Opera

Tried to find an answer, but I guess my search skills needs a makeover. Anyways:

I am doing some styling to a text field (input) when it's disabled. Basically I'm making the background dark gray and the font color white. This works perfectly (Safari needed a -webkit-text-fill-color property in addition to color: white;) - but opera is not listening to me!

No matter what I do, where I do it, and how I do it, the font color is still a pretty dark gray (which I assume is the standard color). If I remove the disabled-attribute, everything works perfectly.

excerpt of my CSS styling for the disabled style:

#customerNumberSearch[disabled="disabled"],
#customerNumberSearch:disabled {
    color: white;
    -webkit-text-fill-color: white;
}

So, how do you change the font color of a disabled input field in Opera?


Edit - alternative solution: This problem can be circumvented by changing out the disabled-attribute for readonly. This has some side effects, however, so make sure this works for you. A nice side effect is that this also fixes the problem in <= IE9

Upvotes: 1

Views: 1185

Answers (2)

Arun Bertil
Arun Bertil

Reputation: 4648

Try

input[disabled] { color: red;}

Upvotes: 1

Shiva Avula
Shiva Avula

Reputation: 1836

Can u try one of these:

[disabled] {
    color:#fff;
}

OR

#customerNumberSearch[disabled] {
    color:#fff !important;
}

Upvotes: 0

Related Questions