3

Can anyone give me a cross-browser supported solution for this problem?

Anirudh Ramanathan
  • 45,145
  • 22
  • 127
  • 184
Eli
  • 14,673
  • 5
  • 57
  • 77
  • Please state what problems you are facing and in what browsers. Also for better feedback, you may want to read the [faq](http://stackoverflow.com/faq) to make a better question. – Fewfre Jun 26 '12 at 12:23

2 Answers2

3

You can use a custom jquery plugin like in this reference:

http://www.marghoobsuleman.com/jquery-image-dropdown

Ahsan Rathod
  • 5,397
  • 2
  • 19
  • 25
2

HTML:- You can use inline style like below,

<select>
    <option style="background-image:url(1stimage.gif);">1</option>
    <option style="background-image:url(2ndimage.gif);">2</option>
    <option style="background-image:url(3rdimage.gif);">3</option>
</select>

The above code would work in Firefox and Webkit browsers. For rest of the browsers you can use JQuery UI, please find the link below

http://docs.jquery.com/UI/Selectable

EDIT: You can also try this http://www.jankoatwarpspeed.com/post/2009/07/28/reinventing-drop-down-with-css-jquery.aspx

Subhajit
  • 1,859
  • 3
  • 18
  • 21