How to fix the size of the <html: select> field (the content may be larger, but the combo size must be fixed)

How to fix the size of the combo box (the content may be larger, but the combo size must be fixed). Now my combo size changes based on the elements in the combo.

I am trying to get something similar to yahoo sign up security. Combination of questions: https://edit.yahoo.com/registration?.src=fpctx&.intl=in&.done=http://in.yahoo.com/

my code: Text that determines the size of the combo

+3
source share
2 answers
<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>
+10
source

css "width: 100px" , .

+3

Source: https://habr.com/ru/post/1744347/


All Articles