I am looking to create a dropdown menu with a custom arrow design.
I have attempted to achieve this by wrapping my select element in a div with an arrow image background.
The issue I am facing is that the select element seems to have 3-4 pixels of top padding from the surrounding div, and I cannot identify the cause.
<style>
.styleSelect select {
font-weight:bold;
-moz-appearance:none;
-webkit-appearance: none;
border:none;
width: 140px;
}
.styleSelect select::-ms-expand {
display: none;
}
.styleSelect {
width: 120px;
overflow: hidden;
background: url("/Images/dropdown_arrow.gif") no-repeat right #fff;
border: 1px solid #000;
float: right;
margin-left: 3px;
border-radius: 8px;
}
</style>
Below is my HTML code:
<form>
<div class="styleSelect">
<select></select>
</div>
</form>