When viewed in Internet Explorer, you may notice that the content of the gray box is overflowing into the yellow box, a behavior not observed in other browsers.
.parent {
display: block;
position: relative;
border: 1px solid black;
height: 300px;
width: 200px;
display: flex;
flex-flow: column;
}
.childA {
display: block;
background-color: grey;
width: 100%;
height: auto;
}
.childB {
display: block;
background-color: yellow;
width: 100%;
height: 100%;
overflow: auto;
}
<div class="parent">
<div class="childA">
aaaaaaaaaaaaaaa
aaaaaaaaaaaaaaa
aaaaaaaaaaaaaaa
aaaaaaaaaaaaaaa
aaaaaaaaaaaaaaa
aaaaaaaaaaaaaaa
aaaaaaaaaaaaaaa
aaaaaaaaaaaaaaa
</div>
<div class="childB">
bbbbbbbbbbbbbbb
bbbbbbbbbbbbbbb
bbbbbbbbbbbbbbb
bbbbbbbbbbbbbbb
bbbbbbbbbbbbbbb
bbbbbbbbbbbbbbb
bbbbbbbbbbbbbbb
bbbbbbbbbbbbbbb
bbbbbbbbbbbbbbb
bbbbbbbbbbbbbbb
bbbbbbbbbbbbbbb
bbbbbbbbbbbbbbb
bbbbbbbbbbbbbbb
bbbbbbbbbbbbbbb
bbbbbbbbbbbbbbb
bbbbbbbbbbbbbbb
// More content here
bbbbbbbbbbbbbbb
bbbbbbbbbbbbbbb
bbbbbbbbbbbbbbb
</div>
</div>
I am looking to achieve the following goals:
Allow the gray box (childA) to expand based on its content
Let the yellow box (childB) occupy the remaining height within its parent
Properly manage overflow if the content of the yellow box (childB) exceeds its dimensions
If anyone can offer assistance, it would be greatly appreciated.