Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert image in OPTION

Status
Not open for further replies.

Izzac

Programmer
Jan 26, 2001
20
CA
Hi,
I search a way to insert an image in an OPTION included (obviously) in a SELECT. I think that is not possible...but maybe....!

<STYLE>
.option1 {font-family: Verdana, Arial; font-size: 11px; background-color: #CDDDDD;}
.option2 {font-family: Verdana, Arial; font-size: 11px; backgroundImage: &quot;img01.gif&quot;;}
</STYLE>

<SELECT size=&quot;3>
<OPTION CLASS=&quot;option1&quot;>Lithium (Li)</OPTION>
<OPTION CLASS=&quot;option2&quot;>Sodium (Na)</OPTION>
</SELECT>

this work just with background-color. somebody knows a way ?

thanks
 
Hi there,

You're nearly there.

You need to insert the image like so

background-image: url(/images/bg.gif)

Url being the path to the image.

See how that goes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top