Looking to place different icons in front of items/options in a HTML select box.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In theory, you could make use of the CSS
background-imageproperty in the<option>element, but that doesn’t work flawlessly in (cough) IE.Best what you can do is to use jQuery/Javascript to mimic a dropdown with a bunch of
<li>or<div>elements. As far no one comes to mind (I’ve never had the need for such a dropdown), but you can find here an overview of the “better” jQuery dropdown plugins, there must be one which suits your needs, for example this one.