Skip to content

Instantly share code, notes, and snippets.

@tylerjohnst
Last active August 29, 2015 14:21
Show Gist options
  • Save tylerjohnst/4c345f73ad3d8ca9ae3e to your computer and use it in GitHub Desktop.
Save tylerjohnst/4c345f73ad3d8ca9ae3e to your computer and use it in GitHub Desktop.
Modern browser compatible select styling with bootstrap 3
select.form-control {
-webkit-appearance: none;
-moz-appearance: none;
background-color: #fff;
background-image: url("select.png");
background-repeat: no-repeat;
background-position: right center;
padding-right: 30px;
&:-moz-focusring {
color: transparent;
text-shadow: 0 0 0 #555;
}
&:-moz-focusring * {
color: #555;
text-shadow: none;
}
&::-ms-expand {
display: none;
}
}
@media (min--moz-device-pixel-ratio: 1.3),
(-o-min-device-pixel-ratio: 2.6/2),
(-webkit-min-device-pixel-ratio: 1.3),
(min-device-pixel-ratio: 1.3),
(min-resolution: 1.3dppx) {
select.form-control {
background-image: image-url("select@2x.png");
background-size: auto 34px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment