I have a dynamic footer on my page and I expect the content above it to scale to reach the top of the footer, that's fine and all, but I'm having a problem:
#snippet-container {
height: 300px;
width: 200px;
}
#page {
display: flex;
flex-flow: column;
height: 100%;
}
#content {
flex: 1 1 auto;
background: blue;
}
#content .test {
width: 100%;
height: 100%;
background: yellow;
border: 2px solid red;
}
#footer {
flex: 0 1 10vh;
background: black;
}
<div id="snippet-container">
<div id="page">
<div id="content">
<div class="test"></div>
</div>
<div id="footer"></div>
</div>
</div>
I would expect the .test
element to fill the #content
element, hence the 100%/100% width/height
however it does not.
You can see this reflected as I gave the .test
element a red border in the snippet.