DropDownList with Icons.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rain

    DropDownList with Icons.

    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


  • Munna

    #2
    Re: DropDownList with Icons.

    On May 31, 7:02 pm, "Rain" <m...@myplace.c omwrote:
    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:50 px;'>&nbsp;</div><span>Yahoo </
    span></option>
    <option><div style='width:50 px;'>&nbsp;</div><span>Googl e</
    span></option>
    </select>

    Best of luck

    Munna



    Comment

    • Rain

      #3
      Re: DropDownList with Icons.

      Doesent work


      "Munna" <munnaonc@gmail .comwrote in message
      news:abc00d39-2a10-4476-b6e3-04073ebf96ff@a9 g2000prl.google groups.com...
      On May 31, 7:02 pm, "Rain" <m...@myplace.c omwrote:
      >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.
      >Unfortunatel y 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:50 px;'>&nbsp;</div><span>Yahoo </
      span></option>
      <option><div style='width:50 px;'>&nbsp;</div><span>Googl e</
      span></option>
      </select>
      >
      Best of luck
      >
      Munna


      www.shatkotha.com

      Comment

      Working...