Hi,
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 struts tags?
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
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
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
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
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
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
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?
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
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.
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
Users Mailing List user@struts.apache.org
To
Struts Users Mailing List user@struts.apache.org
cc
Subject
Adding images to option items in a select drop down list
Hi,
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
12 matches
Mail list logo