Here is my HTML:
<select style="background-color:#e0f0f1">
<option selected="selected">Select</option>
<option class="" value="one">One</option>
<option class="" value="two">Two</option>
</select>
See this code in action
In IE and Opera, when you select an option, it is highlighted with a blue background colour. Firefox, Chrome and Safari don't do this. Is there a way or trick to remove that blue highlight when the option is selected so that the original background colour is always shown?
If that's not possible, is there a way to add a jQuery behaviour that simulates a click elsewhere on the page right after the option is selected? So basically when you click away from the selected option, the highlight disappears.
In IE11 (not sure about previous versions) you can remove the blue background from a focused select element with
select::-ms-value {background: none;}
Here's a dabblet demo
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