I am currently facing an issue with flex boxes nested inside other flex boxes. You can find the code snippet below or view the JS Fiddle here.
#container{
position: absolute;
height: 100%;
width: 100%;
border: 3px solid yellow;
}
.app {
display: flex;
flex-direction: column;
height: 100%;
border: 3px solid black;
}
.app-header {
border: 3px solid red;
}
.app-content {
border: 3px solid green;
flex: 1;
overflow: hidden;
}
.app-footer {
border: 3px solid blue;
}
<div id="container">
<div class="app">
<div class="app-header">HEADER1</div>
<div class="app-content">
<div class="app">
<div class="app-header">HEADER2</div>
<div class="app-content">CONTENT2</div>
<div class="app-footer">FOOTER2</div>
</div>
</div>
<div class="app-footer">FOOTER1</div>
</div>
</div>
I am attempting to make the .app-content DIVs occupy the remaining space within the parent .app DIV. While this works for the outer containers in the fiddle, it doesn't behave as expected for the inner containers like CONTENT2. It seems that using height: 100% may not be effective when the exact height of the parent DIV is unknown... Any advice on how to achieve this behavior correctly?
Edit: The layout functions properly on Firefox but not on Chrome.