I am currently setting up my HTML website with Bootstrap flex and I have a specific layout in mind. I want the inner div to have scrollbars while the outer div fills up the rest of the page.
Take a look at this example:
<div class="d-flex align-items-start flex-column" style="height: 100vh;">
<div style="background-color: red" class="ml-5 mr-5 p-2">Flex item 1</div>
<div style="background-color: blue" class="ml-5 mr-5 p-2">Flex item 2</div>
<div style="background-color: firebrick" class="ml-5 mr-5 p-2">Flex item 3</div>
<div style="background-color: hotpink" class="ml-5 mr-5 p-2">Flex item 4</div>
<div style="background-color: brown" class="ml-5 mr-5 p-2">Flex item 5</div>
<div style="background-color: violet" class="ml-5 mr-5 p-2">Flex item 6</div>
<div id="filler" style="background-color: magenta" class="mb-auto ml-5 mr-5 p-2 overflow-auto">
<div style="background-color: darkcyan">
<div>Flex item 7</div>
</div>
<div id="scroller" style="background-color: crimson;" class="overflow-auto">
<div>Flex item 8</div>
<div>Flex item 8</div>
<div>Flex item 8</div>
<div>Flex item 8</div>
<div>Flex item 8</div>
<div>Flex item 8</div>
<div>Flex item 8</div>
<div>Flex item 8</div>
<div>Flex item 8</div>
</div>
</div>
<div style="background-color: green" class="ml-5 mr-5 p-2">Flex item 9</div>
Currently, the layout is functioning correctly, but the scrollbar is attached to the "filler" div instead of the "scroller" div. How can I resolve this issue?