Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Image with in select tag in html

Tags:

html

Is it possible to place an image in a <select> dropdown list?

I tried the following piece of code

<select name="selection">
    <option><img src="dbdesign.jpg" alt="NOIMAGE"/>list1</option>
    <option><img src="dbdesign.jpg" alt="NOIMAGE"/>list2</option>
</select>

The output shows list1 and list2 but is not showing NOIMAGE, which is the alternative to src of image.

like image 710
RAVITEJA SATYAVADA Avatar asked Nov 28 '11 08:11

RAVITEJA SATYAVADA


1 Answers

You can't add an image to a select tag.

You can create custom menus using CSS/HTML/Javascript, but obviously this a lot more work.

like image 62
tarmes Avatar answered Oct 13 '22 10:10

tarmes