Forum Moderators: not2easy

Message Too Old, No Replies

Relative Positioning

         

dukelips

6:52 am on Aug 23, 2009 (gmt 0)

10+ Year Member



Consider a case where an outer container encloses two inner divs.

The First inner div is positioned as absolute and other as relative.

What will the position of the second inner div if the top value is set for the second inner div. Will it be calculated to the viewport or to the absolute positioned first inner div

dukelips

7:17 am on Aug 23, 2009 (gmt 0)

10+ Year Member



is the box model is applicable to all positioning variants with /without contents

dukelips

7:36 am on Aug 23, 2009 (gmt 0)

10+ Year Member



if a relative div with margin is placed within a relative positioned div, the outer div also gets displaced in Firefox but not in IE.

swa66

7:46 pm on Aug 23, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



An absolutely positioned element uses as reference for it's positioning:
- the closest parent that has "position". Position is a.o. given by setting the position to "relative" (away from the default "static").
- if there is no parent which has position: the viewport.

Absolutely position elements are taken out of the flow (they do not affect elements that are not children of themselves)

dukelips

11:18 am on Aug 24, 2009 (gmt 0)

10+ Year Member



hi swa

please help with the other queries too