I have a <select>
with a lot of <option>
's. Is there any way to limit the height of the displayed <select>
when opened?
It's not possible to change height of a select dropdown because that property is browser specific.
It is not possible to limit the number of visible elements in the select dropdown (if you use it as dropdown box and not as list). But you could use javascript/jQuery to replace this selectbox with something else, which just looks like a dropdown box. Then you can handle the height of dropdown as you want.
the size limit is controlled by the browser and not something you can alter.
See this answer: Height of an HTML select box (dropdown)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With