Forum Moderators: not2easy
Does anyone know a way to have div's absolute but to the top left of their parent object (i.e. <div><div></div></div>) rather than the page?
My problem is I need to have overlapping divs that can be clicked between (one is visible while the others are all hidden) that need to be absolutely placed (else they offset the other content). However, these divs are all inside a div that changes position depending on the browser width (it's centered).
Anyone have any ideas?
cheers..
<div id="a"><div id="b">
</div><div id="c">
</div></div>
#a {position:relative} (or absolute)
#b {position:absolute;top:whatever;left:whatever} (or bottom:whatever;right:whatever}
#c {position:absolute;top:whatever;left:whatever} (or bottom:whatever;right:whatever}
So in this case, div.id=a is a positioned wrapper, and #b and #c can be absolutely positioned realtive to a.
Is this what you were after?