There's a very simple hack that fixes this issue
Here's a codesandbox that illustrates the solution: https://codesandbox.io/s/00w06z1n5l
HTML
<div id="parent">
<div class="hack">
<div class="child">
</div>
</div>
</div>
CSS
.parent { position: relative; width: 100%; }
.hack { position: absolute; left:0; right:0; top:0;}
.child { position: absolute; left: 0; right: 0; bottom:0; }
you can play with the positioning of the hack div to affect where the child positions itself.
Here's a snippet:
html {_x000D_
font-family: sans-serif;_x000D_
text-align: center;_x000D_
}_x000D_
_x000D_
.container {_x000D_
border: 2px solid gray;_x000D_
height: 400px;_x000D_
display: flex;_x000D_
flex-direction: column;_x000D_
}_x000D_
_x000D_
.stuff-the-middle {_x000D_
background: papayawhip_x000D_
url("https://camo.githubusercontent.com/6609e7239d46222bbcbd846155351a8ce06eb11f/687474703a2f2f692e696d6775722e636f6d2f4e577a764a6d6d2e706e67");_x000D_
flex: 1;_x000D_
}_x000D_
_x000D_
.parent {_x000D_
background: palevioletred;_x000D_
position: relative;_x000D_
}_x000D_
_x000D_
.hack {_x000D_
position: absolute;_x000D_
left: 0;_x000D_
top:0;_x000D_
right: 0;_x000D_
}_x000D_
.child {_x000D_
height: 40px;_x000D_
background: rgba(0, 0, 0, 0.5);_x000D_
position: absolute;_x000D_
bottom: 0;_x000D_
left: 0;_x000D_
right: 0;_x000D_
}
_x000D_
<div class="container">_x000D_
<div class="stuff-the-middle">_x000D_
I have stuff annoyingly in th emiddle_x000D_
</div>_x000D_
<div class="parent">_x000D_
<div class="hack">_x000D_
<div class="child">_x000D_
I'm inside of my parent but absolutely on top_x000D_
</div>_x000D_
</div>_x000D_
I'm the parent_x000D_
<br /> You can modify my height_x000D_
<br /> and my child is always on top_x000D_
<br /> absolutely on top_x000D_
<br /> try removing this text_x000D_
</div>_x000D_
</div>
_x000D_