width of the option in a select box

Dear forum,

How to increase the size of the option without increaing the select box's size.
<select name="s1">
<option value="1"> aabac </option>
<option value="2"> bbaca </option>
<option value="3"> abcdefghijjklminoidodo </option>
</select>

Select box should have the width of 'aabac' and the width of the dropdown should be of 'abcdefghijjklminoidodo'. How can i make it that.

form venkisakthi....You can manually set the width:

<select name="s1" style="width:5em">
<option value="1"> aabac </option>
<option value="2"> bbaca </option>
<option value="3"> abcdefghijjklminoidodo </option>
</select>You can't. The select will be the width of the widest one unless you size it smaller, in which case it will truncate the widest ones.
 
Back
Top