Is there a way to change the color of the text in a select box?
And if so, is there a way to make each line of text a different color?
ie:
<select>
<option style='text-color: #cccccc'>Grey
<option>Black
</select>
Is there a way to change the color of the text in a select box?
And if so, is there a way to make each line of text a different color?
ie:
<select>
<option style='text-color: #cccccc'>Grey
<option>Black
</select>
option.line1 {
background-color: #000000;
color: #ffffff;
}
option.line2 {
background-color: #000000;
color: #ffff00;
}
<option class="line1" value="menu1">Menu Item 1</option>
There’s no such thing as the text-color attribute - use color instead:
<select>
<option style='color: #cccccc'>Grey
<option>Black
</select>
Incidentally, background-color also works on select box options - for colour selection menus I tend to change the background colour rather than the colour of the text as it stands out more.
Thanks you two. I sure appreciate it!