There is this strange white border around the options of this select tag, I don’t know what causes it and I would like to get rid of it.
I tried setting "ouline:0;"
but it didn’t work. I was hoping this white border would go away.
Html:
<select name="filtro" id="status">
<option value="encerrado">Encerrado</option>
<option value="pendente">Pendente</option>
</select>
Css:
#status{
background-color: transparent;
padding: 0.5em;
border: 1px solid var(--blue);
border-radius: 3px;
transition: 0.5s;
}
#status option{
background-color: var(--body-color);
color: var(--blue);
}
#status:hover{
cursor: pointer;
padding: 0.65em;
}
2
Answers
You cannot style the dropdown itself. It is rendered on the canvas and cannot be controlled by HTML or CSS. You could add more functionality to the dropdown by using JavaScript. And that border might be caused by the browser or something else. There is no problem with your code either.
if any style is not working then you can use
!important
property this will make your style as important and you can useoutline: none
onfocus
.