1

I currently have a button for each language to allow users to view website in difference languages

<a href="http://www.jthink.net/songkong/en" title='English'><img src="http://static.albunack.net/images/flags/flags-iso/shiny/32/GB.png" alt="English" height="32" width="32" valign="top"></a>&nbsp;
<a href="http://www.jthink.net/songkong/de" title='Deutsch'><img src="http://static.albunack.net/images/flags/flags-iso/shiny/32/DE.png" alt="Deutsch" height="32" width="32"  valign="top"></a>&nbsp;
<a href="http://www.jthink.net/songkong/es" title='Español'><img src="http://static.albunack.net/images/flags/flags-iso/shiny/32/ES.png" alt="Español" height="32" width="32"  valign="top"></a>&nbsp;
<a href="http://www.jthink.net/songkong/fr" title='Français'><img src="http://static.albunack.net/images/flags/flags-iso/shiny/32/FR.png" alt="Français" height="32" width="32"  valign="top"></a>&nbsp;

I now want to use a drop down to save space, but how do I output the flag image as well as the text in the options, currently I have

<select>
  <option value="en">English</option>
  <option value="de">Deutsch</option>
  <option value="es">Español</option>
  <option value="fr">Français</option>
</select> 
Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
  • 1
    possible duplicate of [How to add a images in select list](http://stackoverflow.com/questions/2965971/how-to-add-a-images-in-select-list) – areim Aug 14 '15 at 15:31

1 Answers1

1

You can't have any HTML in option tag, but you can use background-image in CSS. See this: How to add a images in select list.

Community
  • 1
  • 1
Michał Perłakowski
  • 88,409
  • 26
  • 156
  • 177
  • 1
    ok thx, the answer labelled firefox only, does that works for a modern browsers now. I dont like the jquery options such as the ddslick solution, why are jquery plugins always so large and clunky – Paul Taylor Aug 14 '15 at 20:12