Answer the question
In order to leave comments, you need to log in
How to display option in select-e horizontally for Safari (works in chrome)?
This code fully works for all browsers except Safari. The idea is to display the options in the select horizontally with padding between each other.
-webkit-appearance: none !important;
-moz-appearance: none !important;
appearance: none !important; - do not help
How to fix this for safari?
Thank you.
select {
-webkit-appearance: none !important;
-moz-appearance: none !important;
appearance: none !important;
display: table-row !important;
margin: 0 auto !important;
font-size: 24px !important;
overflow: hidden !important;
border: none;
user-select: none;
/* supported by Chrome and Opera */
-webkit-user-select: none;
/* Safari */
-khtml-user-select: none;
/* Konqueror HTML */
-moz-user-select: none;
/* Firefox */
-ms-user-select: none;
}
select:focus {
border: none;
outline: none;
}
select option:focus {
border: none;
outline: none;
}
option {
-webkit-appearance: none !important;
-moz-appearance: none !important;
appearance: none !important;
padding: 100px 100px 10px 100px;
display: inline-block !important;
background: #fff url('http://via.placeholder.com/350x150') no-repeat center bottom 40px;
background-position-y: -40px;
background-clip: border-box;
background-size: cover;
}
<select size="4">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question