I can't change select
height
, with all browser working fine, but Safari no, where can be problem? Also I try make class .style select
, but not working.
select {
width: 170px;
height: 25px;
}
I can't change select
height
, with all browser working fine, but Safari no, where can be problem? Also I try make class .style select
, but not working.
select {
width: 170px;
height: 25px;
}
Try adding this:
-webkit-appearance: menulist-button;
You can also use
line-height: 25px
which doesn't affect other browsers, but fixes this bug in Safari
To style a select in Safari, you first have to turn off the os styling:
-webkit-appearance: none;
The best way use modernizer detector and give safari class select menu a
line-height: 20px;
or you can use jquery UI select menu to solve this by another cross-browser wy.
@media screen and (-webkit-min-device-pixel-ratio:0) {
select {
-webkit-appearance: menulist-button !important;
line-height:24px !important;
}
}
This code ensures the same height across browsers.
at least on iPad the select is not rendered for padding or line-height but instead will render given height and center vertically the value
select {
-webkit-appearance:menu-item; // or menulist-button
-moz-appearance:menu-item;
height:2.4em; // this must be calculated to match other input types
}
input[type="text"], select {
min-width:12em;
border-radius:5px;
}
the only thing unresolved now is background which is predefined and imutable
Nothing worked for me until I used inline style:
<select name="pickupsel" id="pickups" style="line-height:33px">
Somehow Safari (latest Windows version, 5.1.7) doesn't read this style property from CSS file.
@media screen and (-webkit-min-device-pixel-ratio:0) { select { -webkit-appearance: menulist-button !important; line-height:24px !important; } }
Give line-height
according your requirement.