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.
Without using JavaScript, is there a way to set style to the options in Google Chrome? Once selected the background color does not display.
Unfortunately, WebKit browsers do not support styling of <option>
tags yet, except for color
and background-color
.
The most widely used cross browser solution is to use <ul>
/ <li>
and style them using CSS. Frameworks like Bootstrap do this well.