...

View Full Version : relative positioning



adamr1001
03-20-2005, 03:07 AM
i can't seem to find the details i'm looking for elsewhere...

2 questions:

1. when setting the relative positioning of an object, what determines what it's relative to?

2. is there a way to force an object to be positioned relative to another specific object?


many thanks from a novice,

-adam

harbingerOTV
03-20-2005, 05:52 AM
<div id="one">
<div id="two" style="position:relative">
stuff
</div>
</div>

Div 2 is relative to Div 1 as its nested in Div 1.

<div id="two" style="position:relative">
<div id="one">
stuff
</div>
</div>

Div 2 is relative to the page.

An element is relative to what ever is containing it.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum