I want to change the Color of the hovered Select-Option in FireFox which has default blue background and white foreground.
I tried:
<select name="select" size="1">
<option>0</option>
<option class="test">1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
.test:hover {
color:green;
background-color:yellow;
text-decoration:underline;
}
But it doesn't work. See Example.
A FireFox specific solution is sufficient.
Select / Option elements are rendered by the OS/Client, not HTML. You cannot change the style for these elements in modern Browser.
On the top, there is a toolbar with 3 buttons. In the middle, there is a big icon (color-palette icon) which can be used to render the native color picker UI. Click on this icon to pick a new color. Please note that, depending on your browser and OS, the native color picker UI may vary significantly.
Chosen solution Hi, if you mean the Firefox UI toolbars, open the 3-bar menu > Customize, then Themes (at the bottom of the window) and select 'Light' then click Done to save.
SELECT
elements are rendered by the OS, not HTML. You cannot style this element.
You can use a HTML+CSS replacement using JavaScript to simulate SELECT though.
It cannot be done with CSS alone. I recommend a jQuery + Chosen plugin replacement for the <select>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With