Register  |  Login




Advertisement

Start Your Own Q&A Site

Create your own Q&A site easily, allowing you to quickly grow a new community around any subject matter or generate new organic traffic for your existing website.

Question

Status: Closed Points: 75 Time: 15:36 - Mar 18, 2007  

sbjc23

Is it possible to add a small image into the <select> <option> tag in HTML?

I want to add a small image as selections instead of text, is there a way to accomplish this?

Answer Discussion
Tutorials

 

nidhi

Date:: Apr 12, 2007

Time:: 06:16

Interesting question. Ive not seen anything like that. The only thing Ive done before is to show an image based on a selection (javascript).
Not sure from what u ask, if its possible using DHTML

nidhi

Date:: Apr 12, 2007

Time:: 06:38

sexy example of dhtml, its not a dropdown though http://www.milonic.com/mfa/2004-April/ad...

sbjc23

Date:: Apr 12, 2007

Time:: 07:12

Yeah, not really what I wanted but close. So there is no way to do it with the normal tags?

nidhi

Date:: Apr 12, 2007

Time:: 07:34

I'll have a dig around, see what I can come up but Ive never come across this before

sbjc23

Date:: May 07, 2007

Time:: 07:44

I'm assuming that this cant be done. Thanks for the DHTML version.

nidhi

Date:: May 07, 2007

Time:: 12:30

Yea, Im sorry, I couldnt find a way of doing it, hence no response from me.

infobbtechno

Date:: Oct 22, 2008

Time:: 11:01

Though it is possible in Mozilla, but IE doesn't support it :(
<option value="value" style="background:url('image_location') no-repeat left">Your text here</option>

Any body have some comments about IE??

sergiogumercindo

Date:: Mar 02, 2009

Time:: 09:12

Hi, u can use classes specifics for each flag in tag option, exemple:<option class="flag" value="br">BRASIL</options>, and declare the details for your background (color, image, image-position).I used just one image content all flags around world and I specificied just the background position, in css file:
option.flag[value="br"]{ background-image: url(../imagens/flags.gif);background-repeat: no-repeat;background-attachment: scroll;option.br{background-position:0 -277px;}
much moore easy to update;

sergiogumercindo1

Date:: Mar 02, 2009

Time:: 09:13

Hi, u can use classes specifics for each flag in tag option, exemple:<option class="flag" value="br">BRASIL</options>, and declare the details for your background (color, image, image-position).I used just one image content all flags around world and I specificied just the background position, in css file:
option.flag[value="br"]{ background-image: url(../imagens/flags.gif);background-repeat: no-repeat;background-attachment: scroll;option.br{background-position:0 -277px;}
much moore easy to update;

Question Answered

This question has been closed, and points have been rewarded to the following experts:


nidhi: 75

You're welcome however to comment or give additional information or if you wish, you have the ability to write a Tutorial in the Tutorial Area.

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

No tutorials have been submitted yet. Want to be the first?

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

Ask a Question

Have a new question? Ask!

You have 100 characters to use



Top Experts

View More

Rank

Expert

Points

1.

nidhi

10354

2.

oracleofDelphi

6493

3.

rcastagna

5596

4.

LAGM

4848

5.

PeterNZ

3487

6.

gonzalo

2840

7.

Mason

2770

8.

jgivoni

2303

9.

xarcus

1820

10.

Anpanman

917

Become an Expert

Register today to share your knowledge with the community and be recognized and rewarded for your contributions.


Register Here




"Psst, Quomon is a great site. Pass it on."     Tell a Friend  |   Link To Us  |   Save to Delicious  |   Digg! Digg it



Language Options

English:

www.quomon.com

Español:

www.quomon.es