0

enter image description here

Why doesn't the outline work?

select{
    width: 125px;
    padding: 6px 7px;
    background-color: #333;
    border: none;
    outline:none;
    box-shadow: none;
    color: #fff;
    border-radius: 5px;
} 
select:focus{
    outline:none;
    border:none;
    box-shadow:none;
} 

is there any other method?

  • They are OS-dependent and are not part of the HTML/browser. It cannot be styled via `CSS`. https://stackoverflow.com/questions/1895476/how-do-i-style-a-select-dropdown-with-only-css and https://stackoverflow.com/questions/7208786/how-to-style-the-option-of-an-html-select-element – Rahul Apr 05 '20 at 18:25
  • see answer below, definitely not true. – DCR Apr 05 '20 at 18:26

1 Answers1

-1

it is working! you have outline:none !!!

select{
    width: 125px;
    padding: 6px 7px;
    background-color: pink;
    border: none;
    outline:none;
    box-shadow: none;
    color: #fff;
    border-radius: 5px;
} 
select:focus{
    outline:none;
    border:none;
    box-shadow:none;
    outline: green solid 10px;
} 
<select>
<option>1</option>
<option>2</option>
<option>3</option>
</select>
DCR
  • 14,737
  • 12
  • 52
  • 115