Given this simple html,
<select id="ddl">
<option style="background:#0f0">a</option>
<option style="background:#f00;">b</option>
<option>c</option>
</select>
( http://jsfiddle.net/DxK47/ ) You can see that each parameter has its own background color.
Unfortunately, when a parameter is selected (as a result of which the drop-down list "closes"), the background remains white (or whatever the default value of the page).
Is it possible for the background of the selected item to appear in the drop-down list after selection (ideally without using javascript).
source
share