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 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2007
    Location
    Portland, OR
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    centering content

    How do I center the columns, header, and footer on the page?

    Please view: http://www.spirit-medium.net/

    Thanks

  • #2
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    I actually so thought you were using tables then. Anyway, just wrap it up in a container div, set a width and its margins to margin: 0 auto;. You can center most elements this way.

  • #3
    Regular Coder
    Join Date
    Feb 2007
    Location
    Canada
    Posts
    924
    Thanks
    10
    Thanked 56 Times in 55 Posts
    Code:
    html, body {
      margin: 0 auto;
      padding: 0;
      width: 90%;
      background-color: #cfc;  /* light green body color */
      color: #000;
    
    }

  • #4
    New Coder
    Join Date
    Jul 2007
    Location
    Portland, OR
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by jlhaslip View Post
    Code:
    html, body {
      margin: 0 auto;
      padding: 0;
      width: 90%;
      background-color: #cfc;  /* light green body color */
      color: #000;
    
    }
    This style is already there. Do I have to create another container and add the style to it?


  •  

    Posting Permissions

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