I'm trying to make the div not expand over user visibility, but when I dock multiple items in this div, it expands off screen.
Here is an example.
I know, it sounds long, but I was trying to reproduce the entire layout to find the problem.
<body>
    <div class="container">
        <div class="head"></div>
        <div class="main">
            <div class="painel"></div>
            <div class="dash">
                <div class="head-dash"></div>
                <div class="content-dash">
                    <div class="email-list">
                        <div class="head-content"></div>
                        <div class="content">
                            <div class="item"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
https://jsfiddle.net/ricardosc12/rb2kjtfh/12/
change the variable quant -> 50 and you will see the problem
Probably its height setting to 100% ignores its adjacent element, but how can I make it take up the remaining space without expanding later.
As you can see in the example, the email-list class has expanded over content, pushing all the main ones down.
I'm looking for a solution to this using flex, but can you suggest other possibilities.
I looked around but it didn't work.
 
    