fixed width <select> box Internet Explorer Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pravinnweb
    New Member
    • Dec 2007
    • 18

    fixed width <select> box Internet Explorer Problem

    I have a form with lots of select boxes with fixed widths in order to fit in with the design. The problem I have is that some of the values in the options are much wider than the select box so the text in the options is cut off at the width of the select box. In firefox etc the options just expand to the width of the values but not in IE, so if there is a long bit of text in the option, much of it is cut off.

    How can I make the options appear properly in IE?

    thnaks in advaced!
  • Death Slaught
    Top Contributor
    • Aug 2007
    • 1137

    #2
    That's just something that FF does and IE doesn't. You could see what this piece of could would do to your select box.

    [CODE=css]select {
    overflow:auto;
    }[/CODE]

    Thanks,
    {\_/}
    (' . ')
    (")[DEATH](")
    (")(")

    Comment

    • pravinnweb
      New Member
      • Dec 2007
      • 18

      #3
      i tried wht you hv give. but doesnt solve my problem..the scene is the options in select box works properly in FF but does not expand in IE


      here is the code please check in the IE
      Code:
      <select style="width: 70px; overflow:auto;" name="test">
      <option value="1">111111111111111111
      <option value="2">2222222222
      <option value="3">3333333333333
      <option value="4">444
      </select>
      please help!. thanks in advance!
      Last edited by eWish; May 28 '08, 03:11 AM. Reason: Please use code tags

      Comment

      • Death Slaught
        Top Contributor
        • Aug 2007
        • 1137

        #4
        Well for one you're not ending your options properly.

        [CODE=html]<select>
        <option>First Option</option>
        <option>Secon d Option</option>
        </select>[/CODE]

        See if ending your tags fixes the problem.

        Thanks,
        {\_/}
        (' . ')
        (")[DEATH](")
        (")(")

        Comment

        • pravinnweb
          New Member
          • Dec 2007
          • 18

          #5
          Originally posted by Death Slaught
          Well for one you're not ending your options properly.

          [CODE=html]<select>
          <option>First Option</option>
          <option>Secon d Option</option>
          </select>[/CODE]

          See if ending your tags fixes the problem.

          Thanks,
          {\_/}
          (' . ')
          (")[DEATH](")
          (")(")
          as you suggested i tried but its not working!
          give me another solutions please
          thanks!

          Comment

          • hammadtariq
            New Member
            • Jul 2010
            • 1

            #6
            Is that the text get truncated under panel in IE because panel is not expanding? You can create your own <select> element using YUI Library to solve width problem.

            There are couple of other solutions are also available like expanding the select on mouseover. That is discussed also.
            See if that help!

            Comment

            Working...