I'm trying to set the style of an option
in a select
dropdown menu in Google Chrome. It works in all browsers except IE9 and Chrome.
option.red {
background-color: #cc0000;
font-weight: bold;
font-size: 12px;
color: white;
}
<select name="color">
<option class="red" value="red">Red</option>
<option value="white">White</option>
<option value="blue">Blue</option>
<option value="green">Green</option>
</select>
Without using JavaScript, is there a way to set style to the options in Google Chrome? Once selected the background color does not display.