Skip to content

Instantly share code, notes, and snippets.

Created December 15, 2015 12:56
Show Gist options
  • Save anonymous/fae60f7af498c455ee17 to your computer and use it in GitHub Desktop.
Save anonymous/fae60f7af498c455ee17 to your computer and use it in GitHub Desktop.
JS Bin How to style a select // source https://jsbin.com/nagene
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="How to style a select">
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
select {
margin: 50px;
border: 1px solid #111;
background: transparent;
width: 150px;
padding: 5px 35px 5px 5px;
font-size: 16px;
border: 1px solid #ccc;
height: 34px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: url(https://jsbin.com/favicon.ico) 100px no-repeat #eee;
}
</style>
</head>
<body>
<select>
<option>Apples</option>
<option selected>Pineapples</option>
<option>Chocklate</option>
<option>Pancakes</option>
</select>
<script id="jsbin-source-css" type="text/css">select {
margin: 50px;
border: 1px solid #111;
background: transparent;
width: 150px;
padding: 5px 35px 5px 5px;
font-size: 16px;
border: 1px solid #ccc;
height: 34px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: url(https://jsbin.com/favicon.ico) 100px no-repeat #eee;
} </script>
</body>
</html>
select {
margin: 50px;
border: 1px solid #111;
background: transparent;
width: 150px;
padding: 5px 35px 5px 5px;
font-size: 16px;
border: 1px solid #ccc;
height: 34px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: url(https://jsbin.com/favicon.ico) 100px no-repeat #eee;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment