-1

I have a form with disabled text input fields that I would like to style to look normal but not allow input.

Works in Chrome, but not in FireFox or IE - is this something that can be done in FF/IE?

HTML:

<input type="text" value="test" disabled />

CSS:

input[type="text"][disabled] {
    background-color: #f00;
}
dan
  • 401
  • 1
  • 5
  • 10
  • 1
    Possible duplicate of [Styling a disabled input with css only](http://stackoverflow.com/questions/18445543/styling-a-disabled-input-with-css-only) – Matsemann Oct 22 '15 at 20:52

1 Answers1

2

You can do this:

input[type="text"][disabled],
input[type="text"]:disabled {
    color: #ff0;
    background-color: #f00;
}
<input type="text" value="test" disabled />

JSFiddle: http://jsfiddle.net/jonsuh/brbktnvv/

jonsuh
  • 2,875
  • 1
  • 18
  • 23