tags:

views:

194

answers:

2

Hello all ,

How to fix the size of the combo box (contents may be larger but the combo size should be fixed).Now my 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

A: 

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

Tobias Rundbom
+1  A: 
<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>
vooD