I have the following code. I want the second div to take the remaining space of the page and allow inner content to scroll if it overflows. But it does not seem to work.
<div style="max-height: 100vh; height: 100vh">
<div style="height: 100%; display: flex; flex-direction: column">
<div style="flex: 0 1 auto">
This is some fixed heighted content
</div>
<div style="flex: 1 1 0%; overflow: auto">
A lot of text content here that overflows the remaining space.
So this div should take up the remaining available space (100vh - space of div above)
and the inner content should become scrollable
But it ends up expanding the div to the text content and thus the whole screen becomes
scrollable instead of just the div
</div>
</div>
</div>
Any help would be much appreciated :)