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?
I used this way to showed the drop down list when the width is not showed correctly.
It work for IE6, Firefox and Chrome.
This seems to work well in forcing IE to reevaluate the select width. Works in IE7 and IE8.
OK so here is the solution I figured out after quite some time. It will automatically increase the size of the select box based on the maximum width of the child options.
The Select Box:
The absolute easiest way to make sure select lists are always exactly as wide as they need to be is to allow the browser to set their width, i.e. don't set a width yourself. This "method" (really a non-method, as it involves not doing something) will work on every browser ever made, even IE6.
I placed in a table cell, just trying to keep the same width with the cell.
btw, thanks for all the posts, it helps me a lot.
css:
html: