1

Are there any ways to show images instead of text within a drop down box (using the tag)?

Thanks in advance, Monte

  • Please please please tell us what Operating System, Windowing toolkit and Programming language you are using. Or is this HTML? – Alex Brown Sep 04 '09 at 21:40
  • Possible duplicate of [How to add a images in select list](http://stackoverflow.com/questions/2965971/how-to-add-a-images-in-select-list) – Kevin Brown-Silva Jan 01 '17 at 17:20

4 Answers4

0

You can't do this with normal drop down boxes in HTML. You might be able to build something like a drop down box with JQuery or something similar, but there isn't anything to do this in normal HTML.

Mike Cooper
  • 2,928
  • 2
  • 26
  • 29
0

You can use the optgroup tag inside of your selection tag. These are allowed to be styled and have a background image. Style it via css and put one option per group.

w3c optgroup description

xijo
  • 4,366
  • 4
  • 23
  • 30
0

I assume that you're tagging about a dropdown box for a web browser. If that assumption is true, and if you're willing to use Javascript, then you could use something like the Javascript Custom Dropdown v2.1 by Marghoob Suleman.

Matthew Rankin
  • 457,139
  • 39
  • 126
  • 163
0

I have created an ASP.NET server-side control (using AJAX) that has a checkbox list in what appears to be a dropdown, so I can tell you -- it CAN be done. Two panels, one which looks like a dropdown and shows the other when you click it. Put the payload in the other panel.

That get you started?

Brad
  • 15,361
  • 6
  • 36
  • 57