Google Answers Logo
View Question
 
Q: (HTML/CSS) SELECT pop-up menu width issues in Win IE ( No Answer,   7 Comments )
Question  
Subject: (HTML/CSS) SELECT pop-up menu width issues in Win IE
Category: Computers > Programming
Asked by: alexander-ga
List Price: $10.01
Posted: 21 Apr 2004 03:41 PDT
Expires: 21 May 2004 03:41 PDT
Question ID: 333575
<select style="width:100px;">
<option>choose...
<option>when the menu has a short width set,
<option>text happily falls off the right edge of the menu
<option>other browsers are smart and pop up a widened menu
<option>but not Win IE...
</select>

( http://eden2.com/winie.html )

How can I make Win IE show the full width of the contents when the
menu is opened? The displayed closed menu must be of the specified
(too short) width, and I can't do any formatting hijinx like widening
the menu when it's clicked on and then shrinking it again after, if
that's even possible.
Answer  
There is no answer at this time.

Comments  
Subject: Re: (HTML/CSS) SELECT pop-up menu width issues in Win IE
From: till-ga on 21 Apr 2004 04:26 PDT
 
Without using java this does not seem to be possible in Windows Internet Explorer.

till-ga
Subject: Re: (HTML/CSS) SELECT pop-up menu width issues in Win IE
From: alexander-ga on 21 Apr 2004 04:50 PDT
 
Java or Javascript? I have no problem with Javascript...
Subject: Re: (HTML/CSS) SELECT pop-up menu width issues in Win IE
From: till-ga on 21 Apr 2004 05:04 PDT
 
I was talking about javascript.
So please try out the following example:

<span style="width:40px;border:3px #aaaaaa groove;">
<select style="direction:rtl;width:40px;font:200 11px arial;"
onmouseover="this.style.width='152px'"
onblur="if(selectedIndex==0)this.style.width='40px'">
<option>select box</option>
<option>This is what I'll expand to</option>
<option>Another option</option>
<option>Yet another option</option>
</select>

till-ga
Subject: Re: (HTML/CSS) SELECT pop-up menu width issues in Win IE
From: till-ga on 21 Apr 2004 05:05 PDT
 
I found the idea for the above given example at:
( http://forums.devshed.com/archive/t-44450 )

till-ga
Subject: Re: (HTML/CSS) SELECT pop-up menu width issues in Win IE
From: alexander-ga on 21 Apr 2004 06:23 PDT
 
Good find, but unfortunately the dynamic resizing messes up the
formatting -- this popup is run inside a very small frame.

I poked around a bit at that site, and you may be right that this is
simply not possible. :(
Subject: Re: (HTML/CSS) SELECT pop-up menu width issues in Win IE
From: pigletandpooh-ga on 21 Apr 2004 08:29 PDT
 
There is a primitive workaround depending on the was you are
generating the HTML code. I assume you are generating it ( the option
list ) dynamically, because otherwise all you have to do is take out
the width specification and the drop down box will automatically
adjust to the proper size.
But as a workaround, if you was a fixed size drop down-box even when
no options are available, I suggest you remove the width specifier and
create one option with a series of non-breaking spaces:

<select>
<option>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
</select> 

It's a hack but it will probably do the trick.
Subject: Re: (HTML/CSS) SELECT pop-up menu width issues in Win IE
From: alexander-ga on 22 Apr 2004 03:01 PDT
 
It sounds like you understood it backwards -- I want the "closed" menu
to appear very short, but appear full-size when it is "opened". I
tried adding some &nbsp;s for fun anyway, but no luck. :(

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy