Custom Form Select
With functional arrow :after select
by dfederighi
HTML
<label data-arrow="›">
<select>
<option selected>Select Box</option>
<option>Short Option</option>
<option>This is a longer option</option>
</select>
</label>
CSS
html, body {
background: #444;
text-align: center;
padding: 50px 0;
}
select {
margin: 0;
padding: 5px 5px 7px 5px;
display: inline-block;
direction: rtl;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: none;
outline: none;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
color: #333;
background: #ccc;
/*
-webkit-box-shadow: 0 3px 0 #999, 0 -1px #fff inset;
-moz-box-shadow: 0 3px 0 #999, 0 -1px #fff inset;
box-shadow: 0 3px 0 #999, 0 -1px #fff inset;
*/
cursor: pointer;
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
select { padding-right: 24px }
}
label { position: relative; }
label:after {
position: absolute;
top: -2px;
right:8px;
/* content: '<>'; */
content: attr(data-arrow);
padding: 0 0 2px;
/* border-bottom: 1px solid #ddd; */
font: 22px Arial;
color: #333;
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
transform: rotate(90deg);
pointer-events: none;
}
label:before {
content: '';
position: absolute;
right: 6px;
top: 0;
/*
display: block;
width: 20px;
height: 20px;
*/
background:#ededed;
pointer-events: none;
}