I am trying to change select option
border but unable to do that, I have tried it many times but not find the proper solution. I have attached the screen shot .
As far as I have understood this is not possible, are properties that depend on each browser, no questions past that may make things a little clearer.
Greetings.
Perhaps this may be of help:
How to style a <select> dropdown with CSS only without JavaScript?
The short answer:
THIS CAN'T BE DONE WITH A select
ELEMENT
Possible solution:
Use any UI library (bootstrap, jquery UI, or any other) to make a custom select-like element, that you can style as you wish (they all generate a control using other, customization-friendly elements like ul
, li
, div
....)
The dropdown of a select is part of what's called the ShadowDOM. In the current CSS specs, level 3, there's no way to target most ShadowDOM elements. You can read the specs on the ShadowDOM here, though there's not much in there regarding what you want.
Chrome has a few proprietary selectors to change some shadowDOM elements, but not all. Firefox has even fewer (as far as I know), and Opera has none. IE is probably just as bad or worse.
Your best bet with compatibility in mind is to use a Jquery plugin to mimic the select using other HTML elements if you really want to style it. Here's a neat one.