开发者

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

开发者 https://www.devze.com 2022-12-29 15:47 出处:网络
How to fix the size of thecombo 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.

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

精彩评论

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