This is one problem I always have when i'm fixing layouts. I've got a absolutely positioned DIV, I place a child-DIV inside which also needs to be absolutely positioned. But I really want this child-DIV to behave relative to the parent... Is this even possible? Or do I need to create a wrap-DIV?
<div class="container" style="position:relative;">
<div class="parent" style="position:absolute;">
<!-- this child div will behave relative to .container -->
<div class="child" style="position:absolute;"></div>
</div>
</div>
This is the 'wrapping' solution which I'd rather avoid:
<div class="container" style="position:relative;">
<div class="parent" style="position:absolute;">
<div class="wrapper" style="position:relative;">
<!-- this child div will behave relative to .wrapper-->
<div class="child" style="position:absolute;"></div>
</div>
</div>
</div>