PDA

View Full Version : Is the any way to add image Icons for each option item in select menu?



dmitryseliv
06-12-2006, 07:42 PM
Hi!
Is the any way to add image Icons for each option item in select menu?
Basically I want to display image icon for each select menu option.


Best, DS

djr33
06-13-2006, 03:50 AM
This isn't a javascript question... just basic html. You could use css some, I suppose, but html should do it for you.
Then again, not sure if it's possible.

<select>
<option value="1"><img src="logo.gif" height="10" width="10" alt="logo">something</option>
</select>

Try that. If it works, great. If not, no clue what to tell you. Might just not work within the limits of a select tag.



EDIT: Just tried that, and didn't seem to work.
Play with it and see if it does anything. If not, then I'd suggest maybe looking into css to add a background image or something, but not sure if that will help.
May just not be possible.

OR you could look into the various menu scripts on DD and use one of them instead.

dmitryseliv
06-13-2006, 04:22 AM
It's not possible to do with default select menu properties.
You only can overwrite background color with CSS but again it won't display image there.
The only way of doing writing a custom JavaScript class to overwrite existing properties on select menu.

Best,DS