[thelist] IE6, <select> menus & CSS 'width' property

ghuytro ghuytro at rogers.com
Sun Mar 2 11:59:01 CST 2003

[ Picked text/plain from multipart/alternative ]
I have a page which generates a fixed size popup window (250px wide x 200px
high).  In that popup window i have a <select> menu.

The problem is as follows.  The text displayed on the page -  eg.

<select name="myselect">
    <option value="value">Text that appears on page</option>

- the <option> text is dynamically generated from a server side script and
could sometimes contain a string that will force the select menu to be wider than
the 250px width of the popup menu resulting in a very ugly and unusable

I've tried using CSS to constrain the width of the select menu to 150px, but
it only appears to work properly in NS6+.

In NS6+, the select menu is properly constrained in width to 150px, and when
you click on it to view its contents, the "body" of the menu is as wide as
is necessary to display the longest string.  That is, the body will expand to be wider than
150px if required.

In IE6 (I haven't tested it <IE6), the select menu is properly constrained
in width to 150px, but when you click on it, the "body" of the menu remains
150px wide cutting off any text that may exceed this length.

Am I missing something?

More information about the thelist mailing list