<select class="FunctieSelect">
<option class="yellow" value="-1">- kies -</option>
<option class="yellow" value="1">KSZ functie</option>
<option class="yellow" value="2">Bakker</option>
<option class="yellow" value="3">Schilder</option>
<option class="yellow" value="4">Andere</option>
</select>
with
.yellow
{
background-color: Yellow;
}
generates the following result:
alt text http://thomasstock.net/selectCss.JPG
In practice, only one option will display a yellow background, making it ineffective to set CSS on the select element.
=> How can I keep the selected option yellow after it has been chosen?
I understand that using jquery to create a "change" event, identifying the selected option, and applying CSS accordingly is a potential solution. However, I am curious if there is a simpler approach available.