Home > Back-end >  <select> dropdown list cutting off when limiting visible options
<select> dropdown list cutting off when limiting visible options

Time:11-05

I have a select dropdown menu containing a list of states. I have restricted the visible options after clicking the dropdown via enter image description here

CodePudding user response:

The problem (as it has been written inside of one of the comments of the answers you copied code from is that this crashes from IE11).

You can simply fix this with size attribute onto select tag:

<select id="vehicles" size="2" >
       <option value="Location1">Location1</option>
       <option value="Location2">Location2</option>
       <option value="Location3">Location3</option>
   </select>

This will result in showing only Location1 and Location2

CodePudding user response:

Decrease {this.size=9} until it suits your liking

  • Related