how to remove the blue highlighting from select element in internet explorer
In Interner Explorer, When we bring the focus to a select element, the element gets highlighted with a blue background, like in this given image. This is the default bahavior of Internet Explorer browser to indicate that, the focus is on select element.
How can we remove this highlighting?
Pure CSS method
1 |
select::-ms-value {background: none; color: #42413D;} |
jQuery method
1 2 3 |
$('option').click(function() { $('#select').blur(); }); |
4 comments
neilhanvey
just tested the css version on IE11, it didnt work 🙁
Jacob Nelson
@neilhanvey, Please check if any other code in your application overriding this CSS solution. This solution is working fine for us and confirmed by testing in multiple computers and IE versions.
Nadila Poppyanti
great article!
Sakthi
thank you so much…. worked like a charm