How to limit the height of the select drop-down element, so if the total amount of options is greater than this height, I should get a scroll in the drop-down list. I would be pleased if I could do this in terms of the number of pixels or the number of elements.
So to speak, I had the following html markup:
<select> <option selected>Select</option> <option>This is an option</option> <option>This is another Option</option> <option>This is another Option</option> <option>This is another Option</option> <option>This is another Option</option> <option>This is another Option</option> <option>This is another Option</option> <option>This is another Option</option> <option>This is another Option</option> <option>This is another Option</option> </select>
How can I display only the first 4 options, and the rest in the scroll.
This is what I still have, and it does not work.
html css
Danield
source share