Reputation: 12538
I am trying to find a way to disable the background color of a disabled input field. I was wondering if someone can help me with this?
This is what I tried, which did not work:
input[type="text"][disabled]{background-color:red;}
Upvotes: 27
Views: 69608
Reputation: 133
You can use this to catch all input types
input:disabled {
background-color: red;
}
Upvotes: 2
Reputation: 2051
Try this instead:
input[type="text"]:disabled{background-color:red;}
Source: W3 schools
Upvotes: 65