...

View Full Version : absolute position - centering problem



cfern84
11-03-2006, 10:35 AM
HEllo all,

Just easing back into css at this contract job im working for now... I'll apologize in advance for the heavy handed design of the site and the poor coding to boot - hope to clean things up as I go along.... basically I have positioned all the images and various sections absolutely when I was building this skeleton - and now I cant get the whole page to center... I have tried to put the margin:0 auto; in there bt it doesnt seem to work.

I have attached the site so you can see the code - the css is in the header for now so all of it is there to see . . .

Any help centering would be appreciated - in addition the red/pink title banner towardst he top. I want to get the pink section to extend to the left and right sides of the window regardless of windo size... since it is inside of a larger container div I am unsure how to do this.

Thank again in advance.

link: http://cfernandez.net/ventura/nightsOut.html

cheers!

c

_Aerospace_Eng_
11-03-2006, 01:44 PM
Out of curiosity why did you absolute position everything? Thats probably the worst thing you can do when it comes to laying out a webpage.

<?austin ?>
11-03-2006, 01:54 PM
lets not critisize him aerospace, lets help him :D

ok so what you need to do is add this to your css



body {text-align: center; }

#wrap {
width:your widthpx;
position:relative;
background:your bgcolor;
color:your bgcolor;
margin:auto;
text-align:left;
}

and wrap all your divs in this:

<div id="wrap"></div>

hope i helped!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum