0

Despite following the example from w3schools.com, I can't style my disabled option:

<select id="state-handle">
  <option value="" selected="true" disabled>State of residence</option>
  <option value="usa">USA</option>
</select>

option {
  color: blue;
}

option:disabled {
  color: red;
}

JSFiddle

No red anywhere:

enter image description here

What am I doing wrong? I did the same thing as they do.

EDIT: my config is Windows 10 / Google Chrome (same result using Firefox on my machine)

drake035
  • 3,955
  • 41
  • 119
  • 229

1 Answers1

0

Your styles are valid, but your can remove selected="true" from your disabled option in order to see it.

dako
  • 1,081
  • 1
  • 12
  • 22