Skip to content

Instantly share code, notes, and snippets.

@tpthn
Created July 6, 2012 14:37
Show Gist options
  • Save tpthn/3060544 to your computer and use it in GitHub Desktop.
Save tpthn/3060544 to your computer and use it in GitHub Desktop.
CSS - Styling dropdown
//HTML part
<div class="select-wrapper">
<select id="search_filter">
<option value='username'>Username (recommended)</option>
<option value='lastname'>Lastname</option>
</select>
</div>
//CSS part
select {
border: 0 none;
color: #3B3B3B;
background: transparent;
font-size: 20px;
font-weight: bold;
padding: 2px 10px;
width: 250px;
height: 30px;
*width: 270px;
*background: #DADADA;
}
.select-wrapper {
margin-top:10px;
overflow: hidden;
width: 250px;
height: 30px;
-moz-border-radius: 4px 4px 4px 4px;
-webkit-border-radius: 4px 4px 4px 4px;
border-radius: 4px 4px 4px 4px;
box-shadow: 1px 1px 11px #000;
background: no-repeat scroll 319px 5px #DADADA;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment