I'm trying to style a <select>
elements background-color
on :hover
and at the same time leave the styling of the <option>
dropdown untouched. It seems to me that this issue occurs only in Firefox and not in Chrome/Safari.
Chrome select with background color
Firefox select with background color
This would be the code snippet. Please notice that I don't want to have the dropdown to be affected by the background-color in Firefox. Also: Not only the background color changes. Also the borders change. The whole "native" look gets lost as soon as I give the select a background-color.
select {
background-color: red;
}
<select><option>Option</option></select>
Thanks in advance.
https://stackoverflow.com/questions/36239356/html-select-with-background-color-option-tags-using-chrome
https://stackoverflow.com/questions/12836227/change-select-box-option-background-color – ahmed deeb Jan 07 '22 at 08:46