By using a guide, I created a div that hides overflow and push the normal select arrow off the right side so it can't be seen. By using a custom background image on the outer div, I get my own download arrow. However, for long values of options, the text runs on top of my custom arrow image. I tried adding padding to the select value so the text would stop just before the arrow, but this pushes the default arrow back into view instead of adding space between the option text and the arrow. How can I keep the text from running on top of my arrow?
Oh! And the code to keep chrome from putting orange boxes around my select boxes doesn't work either.
JSFIDDLE here: http://jsfiddle.net/not_a_generic_user/yLy7Y/1/
.styled_select {
border-radius : 5px;
border : 1px solid #666;
overflow : hidden;
margin-bottom : 14px;
position : relative;
background : url('graphics/downarrow.png') no-repeat right -1px;
cursor : pointer;
}
.styled_select select {
/* padding-right : 40px; /* So drop down items with long names don't have text over the down arrow */
width : calc(100% + 30px);
}
select {
background : transparent;
font-size : 13px;
text-transform : uppercase;
font-weight : bold;
}
select:focus {
outline : none; /* kill the orange outline on select but doesn't work*/
-webkit-appearance : none;
}
<div class="styled_select ">
<select id="list_position" name="">
<option value="-1">No Change</option>
<option value="0">On top</option>
<option value="list_49">After Movies to Watch</option>
<option value="list_50">After Anniversary Party Supplies and MORE!</option>
</select>
</div>