7

I have a disabled input element that I am styling using the following CSS:

input[disabled='disabled'] {
    color: #666;
}

This CSS works as expected in Firefox, but Chrome renders the text color several shades too light. If I set the color all the way to black #000000 Chrome renders it as a dark grey instead of black. The problem here is that the CSS produces the expected result in Firefox, but not in Chrome.

An example in JSFiddle which will showcase the discrepancy: http://jsfiddle.net/2AtGX/

How can I get this disabled input element to look the same in Firefox and Chrome?

Richard Keller
  • 1,950
  • 2
  • 18
  • 32

1 Answers1

9

Please check this link for the answer:

How can I fully override Chromium disabled input field colours?

Short answer: set -webkit-text-fill-color: black

Community
  • 1
  • 1
Interrobang
  • 15,663
  • 3
  • 50
  • 61