In Mozilla and non-IE browsers, if the option of select list is of a greater length than the select's width, it will show up. But in IE, it will crop the option up to the select's width.
Is there any way to make IE's select behaviour to be like that of non-IE browsers?
This seems to work well in forcing IE to reevaluate the select width. Works in IE7 and IE8.
if (jQuery.browser.msie) {
jQuery("#" + selectID).css("width", "100%").css('width', 'auto');
}
css:
.set_width { width:120px; }
html:
<select class="set_width"><option>one</option><option>two</option></select>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With