开发者

How to fix the size of the <html:select> combo box (contents may be larger but the combo size should be fixed)

How to fix the size of the combo box (contents may be larger but the combo size should be fixed).Now my开发者_C百科 combo size is changed based on the items in the combo.

I'm trying to get something similar to the yahoo sign up page security Question combo: https://edit.yahoo.com/registration?.src=fpctx&.intl=in&.done=http://in.yahoo.com/

my code: Text which decides the size of the combo


<select style="width: 100px">
  <option>Veeeeeeeeeeeeeeeery lllllllllllllloooong option</option>
</select>

or even better

<style>
.fixed-size  {
  width: 100px;
}
</style>

<select class="fixed-size">
  <option>Veeeeeeeeeeeeeeeery lllllllllllllloooong option</option>
</select>


Set the css style to "width:100px" or whatever width you want the combo box to be.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜