Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Any way to get an image into a standard select list?

Status
Not open for further replies.

j0em0mma

Programmer
Jul 31, 2003
131
US
Is there any way to do something similar to this:

Code:
 <select name=&quot;TestSelect&quot; style=&quot;font-size:20px;&quot;>
  <option value=&quot;TestOption1&quot;><img src=&quot;../images/MyImage.jpg&quot;></option>
 </select>
 
Actually, there can be no tags within the <option> tag so using the standard select box, you cannot do something like that. If you need it desperately, there are javascript select boxes, it should work there. Funny enough, I got this useless solution to work in my Mozilla 1.4 (IE6 and Opera 7 ignored it)

<select style=&quot;font-size: 20px; width: 100px;&quot;>
<option style=&quot;background: url(../images/MyImage.jpg);&quot;>&nbsp;</option>
</select>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top