DropDownList with Icons.

  • Thread starter Thread starter Rain
  • Start date Start date
R

Rain

Hello,

I was wondering if there was a way to include an icon in a dropdownlist. I
found one way, that is to set the background image of the 'option' to the
desired icon and then set the padding to sat 50px, which offsets the text
and makes it look as if the icon is appearing to the left of it.
Unfortunately this only works with firefox and not explorer.

Does anyone have any ideas on how I could acheive this with explorer ?


cheers
 
Hello,

I was wondering if there was a way to include an icon in a dropdownlist. I
found one way, that is to set the background image of the 'option' to the
desired icon and then set the padding to sat 50px, which offsets the text
and makes it look as if the icon is appearing to the left of it.
Unfortunately this only works with firefox and not explorer.

Does anyone have any ideas on how I could acheive this with explorer ?

cheers

Hi

First of all you can mark the style as "!important" to make it highest
priority style.
or perhaps use a different approch to solve the problem
just put a div in inner html of the option's
<select>
<option><div style='width:50px;'>&nbsp;</div><span>Yahoo</
span></option>
<option><div style='width:50px;'>&nbsp;</div><span>Google</
span></option>
</select>

Best of luck

Munna
www.munna.shatkotha.com
www.munna.shatkotha.com/blog
www.shatkotha.com
 
Doesent work


Munna said:
Hi

First of all you can mark the style as "!important" to make it highest
priority style.
or perhaps use a different approch to solve the problem
just put a div in inner html of the option's
<select>
<option><div style='width:50px;'>&nbsp;</div><span>Yahoo</
span></option>
<option><div style='width:50px;'>&nbsp;</div><span>Google</
span></option>
</select>

Best of luck

Munna
www.munna.shatkotha.com
www.munna.shatkotha.com/blog
www.shatkotha.com
 
Back
Top