Search code examples
cssoutline

Why doesn't the "select:focus{outline:none}" work?


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?


Solution

  • 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>