2
I have a select option
with several countries I created the CSS to take the default style of it in browsers.
I have two problems, a need to take out that blue background when I step over each option I need to stay just the text and that yes when changing option change the color of the text only.
The second problem is the overflow
in google Chrome does not appear to me that and how I intend, but in firefox continues to appear.
.select_pt {
width: 200px;
overflow-x: hidden;
overflow-y: hidden;
overflow: hidden;
border-top: 1px solid gray;
border-bottom: 1px solid gray;
border-left: none;
border-right: none;
margin-top: 7px;
text-align: center;
border: none;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
outline: none;
}
.select_pt option {
text-align: center;
color: black;
font-weight: bold;
}
.select_pt option:checked {
font-weight: bold;
font-size: 13px;
color: blue;
}
.select_pt option:not(:checked) {
color: gray;
}
<select id="select_pt" class="select_pt" size="4">
<option value="alemanha">Alemanha</option>
<option value="austria">Áustria</option>
<option value="belgica">Bélgica</option>
<option value="bulgaria">Bulgária</option>
<option value="chipre">Chipre</option>
<option value="croacia">Croácia</option>
<option value="dinamarca">Dinamarca</option>
<option value="eslovaquia">Eslováquia</option>
<option value="eslovenia">Eslovénia</option>
<option value="espanha">Espanha</option>
<option value="estonia">Estónia</option>
<option value="finlandia">Finlândia</option>
<option value="franca">França</option>
<option value="grecia">Grécia</option>
<option value="holanda">Holanda</option>
<option value="hungria">Hungria</option>
<option value="irlanda">Irlanda</option>
<option value="italia">Itália</option>
<option value="letonia">Letónia</option>
<option value="lituania">Lituânia</option>
<option value="luxemburgo">Luxemburgo</option>
<option value="malta">Malta</option>
<option value="polonia">Polónia</option>
<option value="portugal" selected >Portugal</option>
<option value="reino_unido">Reino Unido</option>
<option value="republica_checa">Republica Checa</option>
<option value="romenia">Roménia</option>
<option value="suecia">Suecia</option>
</select>
More because you’re using the properties? overflow-x :Hidden; overflow-y: Hidden; overflow: Hidden; Remove them and Chrome will create the scroll automatically.
– Diego Schmidt