Forum Moderators: not2easy

Message Too Old, No Replies

margin:0px auto effect on position:absolute; in child divs

margin 0px auto and position:absolute

         

celebx

10:05 pm on Aug 14, 2006 (gmt 0)

10+ Year Member



Dear CSS experts,

I would like to know if it's true that margin: 0px auto on a page covering div has effect on position:absolute;left:350px; configured child (page) divs.

I was looking at this website: [pullaria.info...] and as you can see the middle area is nicely centered also if you resize the page. This middle area and the header area's however are positioned with the position:absolute; CSS setting.

So the main div it's configuration with margin:0px auto must have effect on these absolute positioned divs.

I hope someone could confirm this.

Best Regards,
Snt

syff

12:49 pm on Aug 15, 2006 (gmt 0)

10+ Year Member



margin: 0 auto; does indeed center a div block, and if the same div has position: relative; set all child divs will be absolutely positioned inside this already centered block.