Search code examples
internet-explorerbrowserinternet-explorer-9internet-explorer-10internet-explorer-11

Change hover background colour in dropdown menu for IE 10 and 11


Does anyone know if it's possible to change the colour of the highlighting in dropdown menus for IE 10 and 11?

IE 9 highlights with a blue background whereas IE 10 and 11 highlight with grey.

I'd like to highlight the selection the user is hovering over blue like in IE 9.

See imageenter image description here

Larger image here: https://i.sstatic.net/Sw6HR.png

Many thanks for your help


Solution

  • No, you can not. The drop down is part of the browser UI and not the page content.

    Form elements are notoriously difficult to style, with no official W3C spec to do so. The official message is more or less to wait until Web Components/Shadow DOM and friends are ready.

    There are some vendor specific ways to style parts of some form controls in IE10+ (and a different set in WebKit/Blink), but this doesn’t cover the drop down of selects. For selects you can only apply the regular styling to the element itself and to the expand button with the ::expand pseudo element. For the full list see http://msdn.microsoft.com/en-us/library/ie/hh869604(v=vs.85).aspx