SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Feb 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    centering webpage regardless resolution

    using layers with absolute positioning leaves the website all the way to the left when viewed in higher resolution. How do I center the webpage regardless the clients resolution?

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You need to make sure the containing division has a width and then you add margin: 0 auto; to it.

    Code CSS:
    #container{
      width:760px; /* --- change this to meet your needs --- */
      margin:0 auto;
    }
    Welcome to SitePoint BTW.


Tags for this Thread

Bookmarks

Posting Permissions

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