22 August 2008

HTML form width of select element

By default select boxes expand to the size of their content.

Since Netscape 4 has only the proprietary attribute that will give the desired effect, it will not hurt anything to combine the use of CSS and the WIDTH attribute.

<select NAME="foo" WIDTH="300" STYLE="width: 300px">
<option>one
<option>two
<option>three
</select>

No comments: