3

I can not change color for a disabled option on Chrome and Safari for MAC OSx. On firefox this code works. How can i override styles cross browser?

option:disabled {
  color: #a69474;
}
<select>
  <option value="volvo">Volvo</option>
  <option disabled value="saab">Saab</option>
  <option value="mercedes">Mercedes</option>
  <option value="audi">Audi</option>
</select>
Altravista
  • 357
  • 3
  • 12

2 Answers2

2

It is working fine in chrome

option:disabled {
        color: #a69474;
    }
<select>
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="opel">Opel</option>
  <option disabled value="audi">Audi</option>
</select>
Wilson
  • 329
  • 2
  • 11
  • Here's a [jsfiddle](https://jsfiddle.net/s7qukoa8/). It works in Chrome but not Safari or Firefox. – Alex Sep 28 '22 at 20:07
2

Styling of tags is not currently supported by WebKit browsers on Mac OS X. You may find some more ideas here: Pure CSS solution to styling specific options in webkit based browsers?.

source: CSS: Dropdown option text color not working on Mac OS X

Mik3NL
  • 397
  • 2
  • 21