So I have a parent container with fixed height and position relative and in that container I want to have a child element with position absolute, thath DOESN'T expand parent's height. Here is my markup:
<tr class="talent-box-table__row">
<ul class="dropdown-with-arrow" [ngClass]="{'dropdown-with-arrow--open': isTalentHistoryOpen}">
<li class="dropdown-with-arrow__option talent-box-table__approver">
<p class="talent-box-table__approver-name">
userName
</p>
<p class="talent-box-table__status">userDecision</p>
</li>
<li class="dropdown-with-arrow__option talent-box-table__approver">
<p class="talent-box-table__approver-name">
userName
</p>
<p class="talent-box-table__status">userDecision</p>
</li>
<li class="dropdown-with-arrow__option talent-box-table__approver">
<p class="talent-box-table__approver-name">
userName
</p>
<p class="talent-box-table__status">userDecision</p>
</li>
<li class="dropdown-with-arrow__option talent-box-table__approver">
<p class="talent-box-table__approver-name">
userName
</p>
<p class="talent-box-table__status">userDecision</p>
</li>
</ul>
</tr>
And my CSS:
.talent-box-table__row {
position: relative;
height: 7rem;
}
.dropdown-with-arrow {
position: absolute;
z-index: 10000000;
top: 50%;
left: 50%;
height: 15rem;
width: 15rem;
}
My problem is - it should work, there are couple rows like this, and my dropdown should be ABOVE everything else, but right now it just expands parent container height, despite having it set to be 7rem. From what I understand, absolute positioned element should be taken off natural flow, but it look like it doesn't work. Here is also my fiddle that I've made to check it - here everything is working like it should: http://jsfiddle.net/ukswqyo0/4/