My layout features a fixed header and footer, positioned at the top and bottom respectively. The content section in between fills the remaining space, with a scrollbar available if the content extends beyond the area.
<div id="app">
<div id="header">
Header
</div>
<div id="middle">
Middle content
</div>
<div id="footer">
Footer
</div>
</div>
html,
body {
height: 100%;
overflow: hidden;
margin: 0;
}
#app {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
}
#header {
height: 60px;
background-color: blue;
}
#footer {
height: 60px;
background-color: red;
}
#middle {
flex: 1;
overflow-y: scroll;
align-items: flex-end;
}
I'm attempting to have the content in the middle section start from the bottom rather than the top, while still retaining the overflow scrollbars for larger content. I've experimented with setting margins to 0 and exploring flex-direction, but so far no solution has worked.