I have the select box field with downarrow image.when i have select ,dropdown box width is enlarge then the orginal select box width.
code :
<div id="styled-select">
<select name="group" id="group">
<option val="">Please choose</option>
<option val="1">Option 1</option>
<option val="2">Option 2</option>
<option val="3">Option 3</option>
<option val="4">Option 4</option>
</select>
</div>
#styled-select {
width: 260px;
height: 34px;
overflow: hidden;
background: url("../img/downarrow_blue.png") no-repeat right #fff;
border: 1px solid #ccc;
margin:auto;
border-radius:6px;
}
#styled-select select {
background: transparent;
width: 282px;
padding: 5px;
font-size: 15px;
line-height: 1;
border: 0;
border-radius: 0;
height: 34px;
-webkit-appearance: none;
font-family:helvetica-roman;
color:#9C9C9C;
}
when i have changed #styled-select select { width: 260px; } . I got this output in firefox.
how to reduce dropdown box width is equal to the select box.