<p>In IE, the dropdown-list takes the same width as the dropbox (I hope I am making sense) whereas in Firefox the dropdown-list's width varies according to the content. </p>

<p>This basically means that I have to make sure that the dropbox is wide enough to display the longest selection possible. This makes my page look very ugly :(</p>

<p>Is there any workaround for this problem? 
How can I use CSS to set different widths for dropbox and the dropdownlist?</p>

[{'answer_id': 74062, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>You can add a style directly to the select element:</p>\n\n<p><code>&lt;select name="foo" style="width: 200px"&gt;</code></p>\n\n<p>So this select item will be 200 pixels wide.</p>\n\n<p>Alternatively you can apply a class or id to the element and reference it in a stylesheet</p>\n'}, {'answer_id': 74117, 'author': 'pilsetnieks', 'author_id': 6615, 'author_profile': 'https://Stackoverflow.com/users/6615', 'pm_score': 0, 'selected': False, 'text': "<p>So far there isn't one. Don't know about IE8 but it cannot be done in IE6 &amp; IE7, unless you implement your own dropdown list functionality with javascript. There are examples how to do it on the web, though I don't see much benefit in duplicating existing functionality.</p>\n"}, {'answer_id': 74149, 'author': 'Robert C. Barth', 'author_id': 9209, 'author_profile': 'https://Stackoverflow.com/users/9209', 'pm_score': 3, 'selected': False, 'text': "<p>There is no way to do it in IE6/IE7/IE8. The control is drawn by the app and IE simply doesn't draw it that way. Your best bet is to implement your own drop-down via simple HTML/CSS/JavaScript if it's that important to have the the drop-down one width and the list another width.</p>\n"}, {'answer_id': 74550, 'author': 'Sleep Deprivation Ninja', 'author_id': 13002, 'author_profile': 'https://Stackoverflow.com/users/13002', 'pm_score': 4, 'selected': False, 'text': '<p>Creating your own drop down list is more of a pain than it\'s worth. You can use some JavaScript to make the IE drop down work.</p>\n\n<p>It uses a bit of the YUI library and a special extension for fixing IE select boxes.</p>\n\n<p>You will need to include the following and wrap your <code>&lt;select&gt;</code> elements in a <code>&lt;span class="select-box"&gt;</code></p>\n\n<p>Put these before the body tag of your page:</p>\n\n<pre><code>&lt;script src="http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/yahoo_2.0.0-b3.js" type="text/javascript"&gt;\n&lt;/script&gt;\n&lt;script src="http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/event_2.0.0-b3.js" type="text/javascript"&gt;\n&lt;/script&gt;\n&lt;script src="http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/dom_2.0.2-b3.js" type="text/javascript"&gt;\n&lt;/script&gt;\n&lt;script src="ie-select-width-fix.js" type="text/javascript"&gt;\n&lt;/script&gt;\n&lt;script&gt;\n// for each select box you want to affect, apply this:\nvar s1 = new YAHOO.Hack.FixIESelectWidth( \'s1\' ); // s1 is the ID of the select box you want to affect\n&lt;/script&gt;\n</code></pre>\n\n<p>Post acceptance edit:</p>\n\n<p>You can also do this without the YUI library and Hack control. All you really need to do is put an onmouseover="this.style.width=\'auto\'" onmouseout="this.style.width=\'100px\'" (or whatever you want) on the select element. The YUI control gives it that nice animation but it\'s not necessary. This task can also be accomplished with jquery and other libraries (although, I haven\'t found explicit documentation for this)</p>\n\n<p>-- amendment to the edit:<br>\nIE has a problem with the onmouseout for select controls (it doesn\'t consider mouseover on options being a mouseover on the select). This makes using a mouseout very tricky. The first solution is the best I\'ve found so far.</p>\n'}, {'answer_id': 714570, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>We have the same thing on an asp:dropdownlist:\n</p>\n\n<p>In Firefox(3.0.5) the dropdown is the width of the longest item in the dropdown, which is like 600 pixels wide or something like that.</p>\n'}, {'answer_id': 912435, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': '<p>In jQuery this works fairly well.  Assume the dropdown has id="dropdown".</p>\n\n<pre><code>$(document).ready(function(){\n\n    $("#dropdown").mousedown(function(){\n    if($.browser.msie) {\n        $(this).css("width","auto");\n    }\n    });\n    $("#dropdown").change(function(){\n    if ($.browser.msie) {\n        $(this).css("width","175px");\n    }\n    });\n\n});\n</code></pre>\n'}, {'answer_id': 1037055, 'author': 'Tinus', 'author_id': 121290, 'author_profile': 'https://Stackoverflow.com/users/121290', 'pm_score': 3, 'selected': False, 'text': '<p>@Thad you need to add a blur event handler as well</p>\n\n<pre><code>$(document).ready(function(){\n    $("#dropdown").mousedown(function(){\n        if($.browser.msie) {\n            $(this).css("width","auto");\n        }\n    });\n    $("#dropdown").change(function(){\n        if ($.browser.msie) {\n            $(this).css("width","175px");\n        }\n    });\n    $("#dropdown").blur(function(){\n        if ($.browser.msie) {\n            $(this).css("width","175px");\n        }\n    });\n});\n</code></pre>\n\n<p>However, this will still expand the selectbox on click, instead of just the elements. (and it seems to fail in IE6, but works perfectly in Chrome and IE7)</p>\n'}, {'answer_id': 1383840, 'author': 'Justin Fisher', 'author_id': 169060, 'author_profile': 'https://Stackoverflow.com/users/169060', 'pm_score': 3, 'selected': False, 'text': '<p>I used the following solution and it seems to work well in most situations.</p>\n\n<pre><code>&lt;style&gt;\nselect{width:100px}\n&lt;/style&gt;\n\n&lt;html&gt;\n&lt;select onmousedown="if($.browser.msie){this.style.position=\'absolute\';this.style.width=\'auto\'}" onblur="this.style.position=\'\';this.style.width=\'\'"&gt;\n  &lt;option&gt;One&lt;/option&gt;\n  &lt;option&gt;Two - A long option that gets cut off in IE&lt;/option&gt;\n&lt;/select&gt;\n&lt;/html&gt;\n</code></pre>\n\n<hr>\n\n<p>Note: the <em>$.browser.msie</em> does require jquery.</p>\n'}, {'answer_id': 1568875, 'author': 'bluwater2001', 'author_id': 175111, 'author_profile': 'https://Stackoverflow.com/users/175111', 'pm_score': 2, 'selected': False, 'text': '<p>Here is the simplest solution.</p>\n\n<p>Before I start, I must tell you dropdown select box will automatically expand in almost all the browsers except IE6. So, I would do a browser check (i.e., IE6) and write the following only to that browser. Here it goes. First check for the browser.</p>\n\n<p>The code will magically expands the dropdown select box. The only problem with the solution is onmouseover the dropdown will be expanded to 420px, and because the overflow = hidden we are hiding the expanded dropdown size and showing it as 170px; so, the arrow at the right side of the ddl will be hidden and cannot be seen. but the select box will be expanded to 420px; which is what we really want. Just try the code below for yourself and use it if you like it.</p>\n\n<pre><code>.ctrDropDown\n{\n    width:420px; &lt;%--this is the actual width of the dropdown list--%&gt;\n}\n.ctrDropDownClick\n{\n    width:420px; &lt;%-- this the width of the dropdown select box.--%&gt;\n}\n\n&lt;div style="width:170px; overflow:hidden;"&gt;\n&lt;asp:DropDownList runat="server" ID="ddlApplication" onmouseout = "this.className=\'ctrDropDown\';" onmouseover ="this.className=\'ctrDropDownClick\';" class="ctrDropDown" onBlur="this.className=\'ctrDropDown\';" onMouseDown="this.className=\'ctrDropDownClick\';" onChange="this.className=\'ctrDropDown\';"&gt;&lt;/asp:DropDownList&gt;\n&lt;/div&gt;\n</code></pre>\n\n<p>The above is the IE6 CSS. The common CSS for all other browsers should be as below.</p>\n\n<pre><code>.ctrDropDown\n{\n    width:170px; &lt;%--this is the actual width of the dropdown list--%&gt;\n}\n.ctrDropDownClick\n{\n    width:auto; &lt;%-- this the width of the dropdown select box.--%&gt;\n}\n</code></pre>\n'}, {'answer_id': 1873417, 'author': 'Ybbest', 'author_id': 134579, 'author_profile': 'https://Stackoverflow.com/users/134579', 'pm_score': 1, 'selected': False, 'text': '<p><a href="http://developer.yahoo.com/yui/examples/button/button-menu-select.html#" rel="nofollow noreferrer">http://developer.yahoo.com/yui/examples/button/button-menu-select.html#</a></p>\n'}, {'answer_id': 1875534, 'author': 'cam', 'author_id': 228154, 'author_profile': 'https://Stackoverflow.com/users/228154', 'pm_score': 2, 'selected': False, 'text': '<p>if you want a simple dropdown &amp;/or flyout menu with no transition effects just use CSS... you can force IE6 to support :hover on all element using an .htc file (css3hover?) with behavior (IE6 only property) defined in the conditionally attached CSS file.</p>\n'}, {'answer_id': 2516571, 'author': 'BalusC', 'author_id': 157882, 'author_profile': 'https://Stackoverflow.com/users/157882', 'pm_score': 8, 'selected': True, 'text': '<p>Here\'s another <a href="http://jquery.com" rel="noreferrer">jQuery</a> based example. In contrary to all the other answers posted here, it takes all keyboard and mouse events into account, especially clicks:</p>\n\n<pre><code>if (!$.support.leadingWhitespace) { // if IE6/7/8\n    $(\'select.wide\')\n        .bind(\'focus mouseover\', function() { $(this).addClass(\'expand\').removeClass(\'clicked\'); })\n        .bind(\'click\', function() { $(this).toggleClass(\'clicked\'); })\n        .bind(\'mouseout\', function() { if (!$(this).hasClass(\'clicked\')) { $(this).removeClass(\'expand\'); }})\n        .bind(\'blur\', function() { $(this).removeClass(\'expand clicked\'); });\n}\n</code></pre>\n\n<p>Use it in combination with this piece of CSS:</p>\n\n<pre><code>select {\n    width: 150px; /* Or whatever width you want. */\n}\nselect.expand {\n    width: auto;\n}\n</code></pre>\n\n<p>All you need to do is to add the class <code>wide</code> to the dropdown element(s) in question.</p>\n\n<pre><code>&lt;select class="wide"&gt;\n    ...\n&lt;/select&gt;\n</code></pre>\n\n<p><a href="http://jsfiddle.net/HnV9Q/" rel="noreferrer">Here is a jsfiddle example</a>. Hope this helps.</p>\n'}, {'answer_id': 2969250, 'author': 'Sai', 'author_id': 337515, 'author_profile': 'https://Stackoverflow.com/users/337515', 'pm_score': 4, 'selected': False, 'text': '<p>you could just try the following...</p>\n\n<pre><code>  styleClass="someStyleWidth"\n  onmousedown="javascript:if(navigator.appName==\'Microsoft Internet Explorer\'){this.style.position=\'absolute\';this.style.width=\'auto\'}" \n  onblur="this.style.position=\'\';this.style.width=\'\'"\n</code></pre>\n\n<p>I tried and it works for me. Nothing else is required.</p>\n'}, {'answer_id': 3048216, 'author': 'lucien', 'author_id': 367610, 'author_profile': 'https://Stackoverflow.com/users/367610', 'pm_score': 2, 'selected': False, 'text': '<p>check this out.. it\'s not perfect but it works and it\'s for IE only and doesn\'t affect FF. I used the regular javascript for onmousedown to establish IE only fix.. but the msie from jquery could be used as well in the onmousedown.. the main idea is the "onchange" and on blur to have the select box return to normal... decide you\'re own width for those. I needed 35%. </p>\n\n<pre><code>onmousedown="javascript:if(navigator.appName==\'Microsoft Internet Explorer\'){this.style.width=\'auto\'}" \nonchange="this.style.width=\'35%\'"\nonblur="this.style.width=\'35%\'"\n</code></pre>\n'}, {'answer_id': 3161181, 'author': 'Hammad Tariq', 'author_id': 243354, 'author_profile': 'https://Stackoverflow.com/users/243354', 'pm_score': 0, 'selected': False, 'text': '<p>The hedgerwow link (the YUI animation work-around) in the first best answer is broken, I guess the domain got expired. I copied the code before it got expired, so you can find it here (owner of code can let me know if I am breaching any copyrights by uploading it again)</p>\n\n<p><a href="http://ciitronian.com/blog/programming/yui-button-mimicking-native-select-dropdown-avoid-width-problem/" rel="nofollow noreferrer">http://ciitronian.com/blog/programming/yui-button-mimicking-native-select-dropdown-avoid-width-problem/</a></p>\n\n<p>On the same blog post I wrote about making an exact same SELECT element like the normal one using YUI Button menu. Have a look and let me know if this helps!   </p>\n'}, {'answer_id': 3303191, 'author': 'lhoess', 'author_id': 398403, 'author_profile': 'https://Stackoverflow.com/users/398403', 'pm_score': 0, 'selected': False, 'text': '<p>This seems to work with IE6 and doesn\'t appear to break others. The other nice thing is that it changes the menu automatically as soon as you change your drop down selection.</p>\n\n<pre><code>$(document).ready(function(){\n    $("#dropdown").mouseover(function(){\n        if($.browser.msie) {\n            $(this).css("width","auto");\n        }\n    });\n    $("#dropdown").change(function(){\n        if ($.browser.msie) {\n            $("#dropdown").trigger("mouseover");\n        }\n    });\n\n});\n</code></pre>\n'}, {'answer_id': 3494994, 'author': 'jbabey', 'author_id': 386152, 'author_profile': 'https://Stackoverflow.com/users/386152', 'pm_score': 2, 'selected': False, 'text': "<p>BalusC's answer above works great, but there is a small fix I would add if the content of your dropdown has a smaller width than what you define in your CSS select.expand, add this to the mouseover bind:</p>\n\n<pre><code>.bind('mouseover', function() { $(this).addClass('expand').removeClass('clicked');\n                                if ($(this).width() &lt; 300) // put your desired minwidth here\n                                {\n                                    $(this).removeClass('expand');\n                                }})\n</code></pre>\n"}, {'answer_id': 3759984, 'author': 'Ewen', 'author_id': 453874, 'author_profile': 'https://Stackoverflow.com/users/453874', 'pm_score': 3, 'selected': False, 'text': '<p>If you use jQuery then try out this IE select width plugin:</p>\n\n<p><a href="http://www.jainaewen.com/files/javascript/jquery/ie-select-style/" rel="noreferrer">http://www.jainaewen.com/files/javascript/jquery/ie-select-style/</a></p>\n\n<p>Applying this plugin makes the select box in Internet Explorer appear to work as it would work in Firefox, Opera etc by allowing the option elements to open at full width without loosing the look and style of the fixed width. It also adds support for padding and borders on the select box in Internet Explorer 6 and 7.</p>\n'}, {'answer_id': 6389369, 'author': 'Derrick', 'author_id': 265100, 'author_profile': 'https://Stackoverflow.com/users/265100', 'pm_score': 2, 'selected': False, 'text': '<p>This is something l have done taking bits from other people\'s stuff.</p>\n\n<pre><code>        $(document).ready(function () {\n        if (document.all) {\n\n            $(\'#&lt;%=cboDisability.ClientID %&gt;\').mousedown(function () {\n                $(\'#&lt;%=cboDisability.ClientID %&gt;\').css({ \'width\': \'auto\' });\n            });\n\n            $(\'#&lt;%=cboDisability.ClientID %&gt;\').blur(function () {\n                $(this).css({ \'width\': \'208px\' });\n            });\n\n            $(\'#&lt;%=cboDisability.ClientID %&gt;\').change(function () {\n                $(\'#&lt;%=cboDisability.ClientID %&gt;\').css({ \'width\': \'208px\' });\n            });\n\n            $(\'#&lt;%=cboEthnicity.ClientID %&gt;\').mousedown(function () {\n                $(\'#&lt;%=cboEthnicity.ClientID %&gt;\').css({ \'width\': \'auto\' });\n            });\n\n            $(\'#&lt;%=cboEthnicity.ClientID %&gt;\').blur(function () {\n                $(this).css({ \'width\': \'208px\' });\n            });\n\n            $(\'#&lt;%=cboEthnicity.ClientID %&gt;\').change(function () {\n                $(\'#&lt;%=cboEthnicity.ClientID %&gt;\').css({ \'width\': \'208px\' });\n            });\n\n        }\n    });\n</code></pre>\n\n<p>where cboEthnicity and cboDisability are dropdowns with option text wider than the width of the select itself. </p>\n\n<p>As you can see, l have specified document.all as this only works in IE.  Also, l encased the dropdowns within div elements like this:</p>\n\n<pre><code>&lt;div id="dvEthnicity" style="width: 208px; overflow: hidden; position: relative; float: right;"&gt;&lt;asp:DropDownList CssClass="select" ID="cboEthnicity" runat="server" DataTextField="description" DataValueField="id" Width="200px"&gt;&lt;/asp:DropDownList&gt;&lt;/div&gt;\n</code></pre>\n\n<p>This takes care of the other elements moving out of place when your dropdown expands.  The only downside here is that the menulist visual disappears when you are selecting but returns as soon as you have selected.</p>\n\n<p>Hope this helps someone.</p>\n'}, {'answer_id': 7312042, 'author': 'Federico Valido', 'author_id': 929457, 'author_profile': 'https://Stackoverflow.com/users/929457', 'pm_score': 1, 'selected': False, 'text': '<p>The jquery BalusC\'s solution improved by me. Used also: Brad Robertson\'s <a href="http://doctype.com/ie7-width-overrides-minwidth-select" rel="nofollow">comment here</a>.</p>\n\n<p>Just put this in a .js, use the wide class for your desired combos and don\'t forge to give it an Id. Call the function in the onload (or documentReady or whatever).<br/>\nAs simple ass that :)<br/>\nIt will use the width that you defined for the combo as minimun length.</p>\n\n<pre class="lang-js prettyprint-override"><code>function fixIeCombos() {\n    if ($.browser.msie &amp;&amp; $.browser.version &lt; 9) {\n    var style = $(\'&lt;style&gt;select.expand { width: auto; }&lt;/style&gt;\');\n    $(\'html &gt; head\').append(style);\n\n    var defaultWidth = "200";\n\n    // get predefined combo\'s widths.\n    var widths = new Array();\n    $(\'select.wide\').each(function() {\n        var width = $(this).width();\n        if (!width) {\n        width = defaultWidth;\n        }\n        widths[$(this).attr(\'id\')] = width;\n    });\n\n    $(\'select.wide\')\n    .bind(\'focus mouseover\', function() {\n        // We\'re going to do the expansion only if the resultant size is bigger\n        // than the original size of the combo.\n        // In order to find out the resultant size, we first clon the combo as\n        // a hidden element, add to the dom, and then test the width.\n        var originalWidth = widths[$(this).attr(\'id\')];\n\n        var $selectClone = $(this).clone();\n        $selectClone.addClass(\'expand\').hide();\n        $(this).after( $selectClone );\n        var expandedWidth = $selectClone.width()\n        $selectClone.remove();\n        if (expandedWidth &gt; originalWidth) {\n        $(this).addClass(\'expand\').removeClass(\'clicked\');\n        }\n    })\n    .bind(\'click\', function() {\n        $(this).toggleClass(\'clicked\'); \n    })\n    .bind(\'mouseout\', function() {\n        if (!$(this).hasClass(\'clicked\')) {\n        $(this).removeClass(\'expand\');\n        }\n    })\n    .bind(\'blur\', function() {\n        $(this).removeClass(\'expand clicked\');\n    })\n    }\n}\n</code></pre>\n'}, {'answer_id': 7659553, 'author': 'Ahmad Alfy', 'author_id': 497828, 'author_profile': 'https://Stackoverflow.com/users/497828', 'pm_score': 0, 'selected': False, 'text': '<p>Based on the solution posted by <a href="https://stackoverflow.com/questions/73960/dropdownlist-width-in-ie/2969250#2969250">Sai</a>, this is how to do it with jQuery.</p>\n\n<pre><code>$(document).ready(function() {\n    if ($.browser.msie) $(\'select.wide\')\n        .bind(\'onmousedown\', function() { $(this).css({position:\'absolute\',width:\'auto\'}); })\n        .bind(\'blur\', function() { $(this).css({position:\'static\',width:\'\'}); });\n});\n</code></pre>\n'}, {'answer_id': 9115565, 'author': 'mcmwhfy', 'author_id': 1057912, 'author_profile': 'https://Stackoverflow.com/users/1057912', 'pm_score': 2, 'selected': False, 'text': "<p>this is the best way to do this:</p>\n\n<pre><code>select:focus{\n    min-width:165px;\n    width:auto;\n    z-index:9999999999;\n    position:absolute;\n}\n</code></pre>\n\n<p>it's exactly the same like BalusC solution. \nOnly this is easier. ;)</p>\n"}, {'answer_id': 9200617, 'author': 'n0nag0n', 'author_id': 721019, 'author_profile': 'https://Stackoverflow.com/users/721019', 'pm_score': 0, 'selected': False, 'text': '<p>I thought I\'d throw my hat in the ring. I make a SaaS application and I had a select menu embedded inside a table. This method worked, but it skewed everything in the table.</p>\n\n<pre><code>onmousedown="if(navigator.appName==\'Microsoft Internet Explorer\'){this.style.position=\'absolute\';this.style.width=\'auto\'}\nonblur="if(navigator.appName==\'Microsoft Internet Explorer\'){this.style.position=\'\'; this.style.width= \'225px\';}"\n</code></pre>\n\n<p>So what I did to make it all better was throw the select inside a z-indexed div.</p>\n\n<pre><code>&lt;td valign="top" style="width:225px; overflow:hidden;"&gt;\n    &lt;div style="position: absolute; z-index: 5;" onmousedown="var select = document.getElementById(\'select\'); if(navigator.appName==\'Microsoft Internet Explorer\'){select.style.position=\'absolute\';select.style.width=\'auto\'}"&gt;\n        &lt;select name="select_name" id="select" style="width: 225px;" onblur="if(navigator.appName==\'Microsoft Internet Explorer\'){this.style.position=\'\'; this.style.width= \'225px\';}" onChange="reportFormValues(\'filter_&lt;?=$job_id?&gt;\',\'form_values\')"&gt;\n            &lt;option value="0"&gt;All&lt;/option&gt;\n            &lt;!--More Options--&gt;\n        &lt;/select&gt;\n    &lt;/div&gt;\n&lt;/td&gt;\n</code></pre>\n'}, {'answer_id': 10497987, 'author': 'Arif', 'author_id': 1196718, 'author_profile': 'https://Stackoverflow.com/users/1196718', 'pm_score': 0, 'selected': False, 'text': '<p>Its tested in all version of IE, Chrome, FF &amp; Safari</p>\n<p><strong>JavaScript code:</strong></p>\n<pre class="lang-js prettyprint-override"><code>&lt;!-- begin hiding\nfunction expandSELECT(sel) {\n  sel.style.width = \'\';\n}\n\nfunction contractSELECT(sel) {\n  sel.style.width = \'100px\';\n}\n// end hiding --&gt;\n</code></pre>\n<p><strong>Html code:</strong></p>\n<pre class="lang-html prettyprint-override"><code>&lt;select name=&quot;sideeffect&quot; id=&quot;sideeffect&quot;  style=&quot;width:100px;&quot; onfocus=&quot;expandSELECT(this);&quot; onblur=&quot;contractSELECT(this);&quot; &gt;\n  &lt;option value=&quot;0&quot; selected=&quot;selected&quot; readonly=&quot;readonly&quot;&gt;Select&lt;/option&gt;\n  &lt;option value=&quot;1&quot; &gt;Apple&lt;/option&gt;\n  &lt;option value=&quot;2&quot; &gt;Orange + Banana + Grapes&lt;/option&gt;\n</code></pre>\n'}, {'answer_id': 11236037, 'author': 'Aerendel', 'author_id': 1349107, 'author_profile': 'https://Stackoverflow.com/users/1349107', 'pm_score': 0, 'selected': False, 'text': '<p>I\'ve had to work around this issue and once came up with a pretty complete and scalable solution working for IE6, 7 and 8 (and compatible with other browsers obviously).\nI\'ve written a whole article about it right here: <a href="http://www.edgeoftheworld.fr/wp/work/dealing-with-fixed-sized-dropdown-lists-in-internet-explorer" rel="nofollow">http://www.edgeoftheworld.fr/wp/work/dealing-with-fixed-sized-dropdown-lists-in-internet-explorer</a></p>\n\n<p>Thought I\'d share this for people who are still running into this problem, as none of the above solutions work in every case (in my opinion).</p>\n'}, {'answer_id': 12037082, 'author': 'PowerKiKi', 'author_id': 37706, 'author_profile': 'https://Stackoverflow.com/users/37706', 'pm_score': 2, 'selected': False, 'text': '<p>A full fledged jQuery plugin is available. It supports non-breaking layout and keyboard interactions, check out the demo page: <a href="http://powerkiki.github.com/ie_expand_select_width/" rel="nofollow">http://powerkiki.github.com/ie_expand_select_width/</a></p>\n\n<p>disclaimer: I coded that thing, patches welcome</p>\n'}, {'answer_id': 13035783, 'author': 'RasTheDestroyer', 'author_id': 836366, 'author_profile': 'https://Stackoverflow.com/users/836366', 'pm_score': 0, 'selected': False, 'text': '<p>I tried all of these solutions and none worked completely for me.  This is what I came up with</p>\n\n<pre><code>$(document).ready(function () {\n\nvar clicknum = 0;\n\n$(\'.dropdown\').click(\n        function() {\n            clicknum++;\n            if (clicknum == 2) {\n                clicknum = 0;\n                $(this).css(\'position\', \'\');\n                $(this).css(\'width\', \'\');\n            }\n        }).blur(\n        function() {\n            $(this).css(\'position\', \'\');\n            $(this).css(\'width\', \'\');\n            clicknum = 0;\n        }).focus(\n        function() {\n            $(this).css(\'position\', \'relative\');\n            $(this).css(\'width\', \'auto\');\n        }).mousedown(\n        function() {\n            $(this).css(\'position\', \'relative\');\n            $(this).css(\'width\', \'auto\');\n        });\n})(jQuery);\n</code></pre>\n\n<p>Be sure to add a dropdown class to each dropdown in your html</p>\n\n<p>The trick here is using the specialized click function (I found it here <a href="https://stackoverflow.com/questions/898463/fire-event-each-time-a-dropdownlist-item-is-selected-with-jquery">Fire event each time a DropDownList item is selected with jQuery</a>).  Many of the other solutions on here use the event handler change, which works well but won\'t trigger if the user selects the same option as was previously selected. </p>\n\n<p>Like many of the other solutions, focus and mousedown is for when the user puts the dropdown in focus, blur is for when they click away.</p>\n\n<p>You may also want to stick some kind of browser detection in this so it only effects ie.  It doesn\'t look bad in other browsers though</p>\n'}]
['https://Stackoverflow.com/questions/73960', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/747/']