0

Hej, I made a standard drop down menu in my Laravel project, like this:

<select class="product_select" name="products" id="products">
                <option value="pilsner">Pilsner</option>
                <option value="wheat">Wheat</option>
                <option value="ipa">IPA</option>
                <option value="stout">Stout</option>
                <option value="ale">Ale</option>
                <option value="alcohol-free">Alcohol Free</option>
            </select>

However, the standard colour for highlighting the selected element is blue. How can I change it to gray? Does anyone know, how can I do it with css or with JavaScript? The selected element is highlighted with blue

  • This was extremely easy to find via search. Does this answer your question? [How to change colour of blue highlight on select box dropdown](https://stackoverflow.com/questions/19388011/how-to-change-colour-of-blue-highlight-on-select-box-dropdown) – Libra Nov 10 '21 at 20:35

1 Answers1

0

You can use option:hover for that. Here is an example that makes the background-color gray.

option:hover { 
   background-color : gray;
}


 
Bazzz
  • 26,427
  • 12
  • 52
  • 69
Ali Hsaino
  • 131
  • 9