Re: Adding images to option items in a select drop down list

2005-10-19 Thread Dave Newton
Faisal Mahmoud wrote: I am creating a drop down list using the HTML select and option tags. The items in the list will be color names (ex. red, green, blue, etc..). I would like a small square image to be next to each color name text in the list. How would I go about this in my jsp file with my

Re: Adding images to option items in a select drop down list

2005-10-19 Thread Frank W. Zammetti
This isn's something that is possible in straight HTML. There could be a way to do it via CSS, but nothing obvious presents itself to me... I tried setting a background-image, but that didn't work. Can you find an example of it being done? Unless there's some non-obvious CSS trick, or perhaps

Re: Adding images to option items in a select drop down list

2005-10-19 Thread Frank W. Zammetti
Just thought of this... one thing you could do is set the text color of each option. That *does* work. Might serve your purpose alright. You can actually set the color style attribute or background-color, both work. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex

Re: Adding images to option items in a select drop down list

2005-10-19 Thread Dave Newton
Frank W. Zammetti wrote: Just thought of this... one thing you could do is set the text color of each option. That *does* work. Might serve your purpose alright. You can actually set the color style attribute or background-color, both work. Looks funny when you roll over it. Still and

Re: Adding images to option items in a select drop down list

2005-10-19 Thread Frank W. Zammetti
On Wed, October 19, 2005 3:20 pm, Dave Newton said: Looks funny when you roll over it. Still and all, kinda handy for something, I'm sure. Yeah, I thought so too... might be some CSS tricks you could play to keep the color the same when hovered over... I just tried some obvious things, none

RE: Adding images to option items in a select drop down list

2005-10-19 Thread Mark Benussi
List Subject: Re: Adding images to option items in a select drop down list Just thought of this... one thing you could do is set the text color of each option. That *does* work. Might serve your purpose alright. You can actually set the color style attribute or background-color, both work

Re: Adding images to option items in a select drop down list

2005-10-19 Thread Joe Germuska
At 3:11 PM -0400 10/19/05, Frank W. Zammetti wrote: This isn's something that is possible in straight HTML. There could be a way to do it via CSS, but nothing obvious presents itself to me... I tried setting a background-image, but that didn't work. Can you find an example of it being done?

Re: Adding images to option items in a select drop down list

2005-10-19 Thread Frank W. Zammetti
I was thinking you could build an actual custom control to do this, and that's a good start... add a down arrow to the right of it to show the dropdown portion and lock the textbox from editing and you'd have a good start. Thanks Joe! -- Frank W. Zammetti Founder and Chief Software Architect

Re: Adding images to option items in a select drop down list

2005-10-19 Thread Faisal Mahmoud
Okay, somewhere in my head I can remember seeing an example of this, but I can't recall where it was. Sounds like the solution (if one exists) is non-trivial. Appreciate the ideas and if I do come across or develop some sort of solution I will post back to this thread. On 10/19/05, Frank W.

Re: Adding images to option items in a select drop down list

2005-10-19 Thread Frank W. Zammetti
Actually, based on Joe's suggestion, I just threw it together just now. This is literally hacked together off the top of my head, and only tested in IE 6... I can see some things I'd want to fix already, but that's what you get from 5 minutes of hacking! Might make a good candidate for inclusion

Re: Adding images to option items in a select drop down list

2005-10-19 Thread Sunil_Sahu
Faisal, Why you want to use image, you can use stylesheet. You may refer following code: HTML HEAD TITLE New Document /TITLE STYLE type=text/css OPTION.mar{background-color:maroon; color:white} OPTION.red{background-color:red; color:maroon} OPTION.blue{background-color:blue; color:maroon}