An absolutely positioned element is actually positioned regarding a relative
parent, or the nearest found relative parent. So the element with overflow: hidden
should be between relative
and absolute
positioned elements:
<div class="relative-parent">
<div class="hiding-parent">
<div class="child"></div>
</div>
</div>
.relative-parent {
position:relative;
}
.hiding-parent {
overflow:hidden;
}
.child {
position:absolute;
}