Is there a way to style the option
elements in a select
dropdown menu in Google Chrome without using JavaScript? I have tried setting styles with CSS, but 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>
In Google Chrome, the background color of the selected option does not display. Any suggestions on how to resolve this issue?