Skip to content

Instantly share code, notes, and snippets.

@Demwunz
Created July 5, 2013 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Demwunz/5933429 to your computer and use it in GitHub Desktop.
Save Demwunz/5933429 to your computer and use it in GitHub Desktop.
custom select box styling for webkit browsers
<span class="default-dropdown">
<select>
<option value="a">Chumba</option>
<option value="b">Wumba</option>
</select>
</span>
.default-dropdown {
display: inline-block;
position: relative;
&:after {
border-color: blue transparent transparent transparent;
border-style: solid;
border-width: 5px;
content: '';
position: absolute;
pointer-events: none;
top: 14px;
right: 8px;
z-index: 1000;
}
select {
color: #ff0;
display: inline-block;
font-weight: 700;
min-width: 150px;
padding: 10px 18px 10px 10px; /* Right padding to account for triangle decoration */
outline: none;
-webkit-appearance: none;
option {
border: 2px solid blue;
color: blue;
font-weight: 700;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment