.layout {
display: flex;
flex-direction: column;
min-height: 100vh;
}
.body {
flex-grow: 1;
flex-shrink: 0;
background-color: #a0a0a0;
}
.content {
height: 100%;
background-color: #c0c0c0;
}
<div class="layout">
Header
<div class="body">
Body
<div class="content">
Content
</div>
</div>
Footer
</div>
- Why doesn't
div.content
occupy 100% of window? - Is there a way to make
div.content
span 100% vertically while havingdiv.layout
flexbox? - If there isn't, how can I make it while having this header-body-footer structure?
Edit 1
div.body
should follow default display property. I can't make it flexbox.