I have a multiple select input with a min-width set on the select element. The options are not taking up the full width of the available select box in Internet Explorer 9.
The items take up the full width on Chrome and Firefox. How do I make the option elements take the full width of the select input?
Notice the Saab
item here in Internet Explorer:
This Fiddle demonstrates the issue
<select style="min-width: 150px; width: auto;" name="cars" multiple>
<option value="volvo" style="width: 100%;">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
It works correctly in Chrome:
To my knowledge, you can't give OPTION a block layout in IE. It will expand only to the width of its content, I don't believe you can fiddle with its width. You can, as you've demonstrated, adjust the width of the SELECT element without issue.
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