How to limit the options of a select?

-2

I made a modal form in materialize-css and in this form there are several fields, including one that is of (what with problem), it is the Brazilian states, that is 27 states. And when you click on the select it appears a gigantic list with the 27 states and I wanted it to only see 3 and the user scroll down to see the rest ... First of all, I already tried the size attribute in html, and it just does not (I think it's something from materialize), in addition, I've also tried in css to change height, but it does not specifically change what I want, which is to hide the rest. Thanks in advance for your attention.

    
asked by anonymous 12.01.2018 / 16:43

1 answer

0

You can add this to your CSS

.dropdown-content {
    max-height: 200px;
}

In the% wont% you will set the maximum size of the max-height that is opened with the options, dropdown is more or less the size for 3 options.

Hope it helps!

    
12.01.2018 / 18:03