0

I want to style option element, add my own hover color instead of the default blue. I am able to change the background color, but not the hover effect. How can I change it? My code

CSS:

select option {
  background-color:red;
}
select option:hover {
color:black;
  background-color: green !important;
}

HTML:

<div class="dropdown">
        <select>
         <option> 18 per page</option>
         <option> 10 per page</option>
         <option> 5 per page</option>
       </select>
</div>
Alex
  • 1,982
  • 4
  • 37
  • 70
  • it's working fine, but the selection color is above it (add hover using dev tools to see it) – Temani Afif Nov 15 '18 at 10:33
  • Please follow the below link it might help you. https://stackoverflow.com/questions/19388011/how-to-change-colour-of-blue-highlight-on-select-box-dropdown – bulbul bd Nov 15 '18 at 10:48

0 Answers0