I'm trying to change the background color of a drop down list in HTML to transparent.
<select id="nname">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
#nname {
padding: 5px;
color: #000;
font-size: 12px;
background: transparent;
-webkit-appearance: none;
}
however, the background stays white and the text stays black. Any ideas?
This question is related to
css
Or maybe
background: transparent !important;
color: #ffffff;
Source: Stackoverflow.com