2

How can I put image next to the text in the select menu.

For example this is not working:

<select style="background-color:black; width:150px;color:white;">
   <option style="background-image:url(images/english.png);">English</option>
</select>  

This is not working. I want to have a little flag first and then name of the language.

Mat
  • 202,337
  • 40
  • 393
  • 406
user123_456
  • 5,635
  • 26
  • 84
  • 140

1 Answers1

3

The select element does not support that type of thing. It's meant to be a native control that's consistent wherever it's used. You can, however, whip up your own custom drop-down style menu.

Here's one I did (under the graph).
Also, here's a jquery plugin that might make it easier for you.

Good luck!

MicronXD
  • 2,190
  • 16
  • 24