Reputation: 13140
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>
<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>
<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>
<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>
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>
Upvotes: 1
Views: 14613
Reputation: 92669
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.
Upvotes: 1