0
I’m looking for a way to define a max-height
for the tag dropdown <select>
, if this is possible, once a max-height
, me user overflow: auto;
to do as the second image by setting a scroll bar on the element.
If that’s not possible, someone would have some suggestion for what I’m trying to do?
<select>
<option value="Nenhum">Nenhum</option>
<option value="100.00">Até R$ 100,00</option>
<option value="200.00">Até R$ 200,00</option>
<option value="400.00">Até R$ 400,00</option>
<option value="600.00">Até R$ 600,00</option>
<option value="800.00">Até R$ 800,00</option>
<option value="1000.00">Até R$ 1.000,00</option>
<option value="2000.00">Até R$ 2.000,00</option>
<option value="4000.00">Até R$ 4.000,00</option>
<option value="6000.00">Até R$ 6.000,00</option>
<option value="8000.00">Até R$ 8.000,00</option>
<option value="10000.00">Até R$ 10.000,00</option>
</select>
This is from the user-agent and I don’t think there’s any way to set the height, or even set it to scroll, I’ve never actually seen a native browser select that has scroll
– hugocsl
put in the question a verifiable example, I see that you’re using something like bootstrap or material to format, some frameworks/libs may have classes that help, but as @hugocsl commented, with pure css in the element
select
may not be possible withjavascript
or using some framework that renders theselect
differently can be– Ricardo Pontual
I use the Zurb framework, Foundation https://get.foundation
– Homem Mascarado