I'm trying to have a background image for the dropdown options. I've succeeded, but the width isn't working. As you can see in the Fiddle, I have given width to the last option in the dropdown, but it is hiding the text on mouseover. If I didn't give the width, the next images are coming. (For Ex: second option).
So my question is, how can I have the background image in the beginning of the options? (As how it is displaying in the 3rd CLOSED option)
HTML
<select class="select_filter" id="actif_search" style="width:140px; padding:5px 22px 6px 6px;">
<option value="1" style="padding-left:15px;" selected>ACTIVE</option>
<option value="2" class="open">OPEN</option>
<option value="3" class="closed">CLOSED</option>
<option value="4" class="pending">PENDING</option>
</select>
CSS
#actif_search .open{
background: rgba(0, 0, 0, 0) url('https://s14.postimg.org/oax1a438h/all_list_icons.png') no-repeat scroll -11px -57px;
padding-left: 20px !important;
margin-left: -5px;
}
#actif_search .closed{
background: rgba(0, 0, 0, 0) url('https://s14.postimg.org/oax1a438h/all_list_icons.png') no-repeat scroll -51px -57px;
padding-left: 20px !important;
margin-left: -5px;
}
#actif_search .pending{
background: rgba(0, 0, 0, 0) url('https://s14.postimg.org/oax1a438h/all_list_icons.png') no-repeat scroll -30px -57px;
padding-left: 20px !important;
margin-left: -5px;
width: 5px;
}