Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Oct 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    absolute position - centering problem

    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

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Registered User
    Join Date
    Oct 2006
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts
    lets not critisize him aerospace, lets help him

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

    Code:
    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:
    Code:
    <div id="wrap"></div>
    hope i helped!
    Last edited by <?austin ?>; 11-03-2006 at 02:31 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •