Changing color of a row in dropdown list
Posted
by
Judy
on Stack Overflow
See other posts from Stack Overflow
or by Judy
Published on 2011-02-08T07:20:43Z
Indexed on
2011/02/08
7:25 UTC
Read the original article
Hit count: 189
is it possible to change "selector" color in drop-down list?
<select name="select" style="background-color: #ff0000">
<option style="background-color: #ff0000" value="1">Red</option>
<option style="background-color: #ffffff" value="2">Green</option>
<option style="background-color: #0000ff" value="3">Blue</option>
</select>
I tried in above style but it didn't worked. I know with javascript getting document.getElementById('text').style.color='red' can set the color.
But is it possible in html to set the colors?
© Stack Overflow or respective owner