Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

Float centered a page - now absolute position images is off



5:25 pm on Jun 23, 2007 (gmt 0)

5+ Year Member

My page started out as left justified with an important image positioned absolute in the upper right corner.
I put the entire page into a div #container box with left/right margins set to auto and text set to "center".
That centered the page.
The next <div> was another container that held the entire page contents with text set to "left".

So the page is centered on screen and everything is normal except the one important image which was positioned "absolute" as a layer.
It, of course, stayed where it was told to.

(Think of a postage stamp on an envelope). The image needs to be in the upper right corner without pushing other images away.
How do I get it to position?
Any pointers?


11:09 pm on Jun 23, 2007 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

Your #container div needs to have
- then any absolutely positioned elements within this #container will be positioned relative to the #container and not the body, which is what seems to be happening at the moment.


2:34 pm on Jun 24, 2007 (gmt 0)

5+ Year Member

Thank you so very much!
You're advice was 100 percent accurate.
The page is now centered and the absolute position images align perfectly.

Featured Threads

Hot Threads This Week

Hot Threads This Month