Utilizing the transform property:
.parent {
display: inline-flex;
flex-direction: column;
align-items: center;
}
.first {
height: 100px;
}
.second {
height: 100px;
transform: translateY(-50%);
}
<div class="parent">
<div class="first"></div>
<div class="second"></div>
</div>
Despite using transform: translateY(-50%);, the parent div's height remains at 200px instead of adjusting due to lack of content. How can this extra space be removed solely utilizing the transform property?