I'm having a bit of trouble getting a div to resize to its full parent's height with flexbox. The issue only happens under Chrome (48), it renders correctly (or what I understand to be correct) in Firefox (44).
You can check it in the Fiddle: https://jsfiddle.net/jvilla/kjtLoxct/1/
The layout is something like:
...
<body>
<div id="wrapper">
<div id="header"></div>
<div id="page">
<div id="inner"></div>
</div>
<div id="footer"></div>
</div>
...
The idea is to have a flexbox layout with a header and a footer. The "main" portion of the page, between those two, is set to have:
#wrapper {
display: flex;
flex-direction: column;
height: 100%;
}
#page {
flex-grow: 1;
overflow: auto;
height: 100%;
}
And the #page div has a child div with
#inner {
height: 100%;
}
However, the inner div overflows the parent. The parent div has the correct size if you use the inspector (total height - header - footer), but the inner div, despite the 100% height rule that should set its height to its parent's, overflows it.
I've checked several apparently similar issues but I can't seem to find a solution. I'd rather avoid using position: absolute if that's possible.