I'm facing an issue with my layout where the sidebar sometimes becomes taller than the page body, extending beyond the screen height and continuing to expand vertically.
Here's a snippet of my code structure:
<div class="fb-col">
<!-- Headers, etc. -->
<div class="fb-row">
<div class="sidebar">
<!-- Lots of content -->
</div>
<div class="main">
<!-- Less content -->
</div>
</div>
<!-- Footers -->
</div>
Supported by this CSS styling:
.fb-col {
height: 100%;
display: flex;
flex-direction: column;
}
.fb-row {
flex-grow: 1;
display: flex;
flex-direction: row;
align-items: flex-start;
}
.sidebar {
width: 25%;
flex-grow: 0;
}
.main {
flex-grow: 1;
}
Although these settings prevent both elements from growing too much in height, I'm struggling to make the sidebar stop expanding when the content is short.