Forum Moderators: not2easy
Is it possible to have two seperate divs using position:relative, and have them both relative to a seperate point?
This is my trial design:
<snip>
As the content expands, the div it's nested inside expands nicely and the design continues:
<oops>
However, in order to get the menu where it is, I've resorted to putting it inside a position:absolute div, which means it doesn't expand the div as required when it gets large:
<snip again>
When I make them both relative, one begins with a vertical offset in line with where the other one ends. Is it possible to use BOTH wrapper divs for the menu and content relative to the same point, so this doesn't happen - or somehow make the height of one irrelevant to the y-offset of the other?
[edited by: DrDoc at 1:00 am (utc) on May 4, 2004]
[edit reason] No URLs, thanks. See TOS [webmasterworld.com] [/edit]
It's difficult to explain a problem sometimes without an image but if you could narrow some code down to a simple focus on the issue and post it here we would be glad to help. Use colors and then you can tell us where you want coloured divs to be.
Is it possible to have two seperate divs using position:relative, and have them both relative to a seperate point?
No, would be my first answer for this because a div (or any element) is always relative to its preceeding element, (which is why your menu is "offset" it's appearing relative to the content I presume) the "point" can't be different.
However I think if we saw your code we could help with a different way of thinking perhaps..
Do you want to have the menu stretch with the content even though it's absolutely positioned?
Look forward to hearing more from you
Suzy