SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru etidd's Avatar
    Join Date
    May 2011
    Location
    atlanta, ga
    Posts
    632
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Question Slightly Wide Page - Centering Page on Page Load

    Hi all,

    I've really shaved down on my page at Atlanta Review. I have an issue with how to center the page on page load. My page is just a bit wide right now, but I think it would be good to center the focus when the page loads.

    Also, why is the page still tall? It should be pretty short (700-800px total page height).
    Check it out and let me know what you think.

  2. #2
    SitePoint Member
    Join Date
    Sep 2011
    Location
    The Netherlands
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    This will be my first post here, been lurking for roughly a year now on these forums, which has helped me alot, so it's time i'll start to try and contribute

    Code:
    #rightside {
        float: right;
        margin: 405px 12px;
        min-height: 800px;
        width: auto;
    }
    The reason for your page being this tall is the style of your rightside div, is the part in red. U have a margin of 405px applied to the top and bottom. Try setting it to margin: 405px 12px 0 12px; that way it should still have 12 pixels margin on both sides, and only 405 pixels at the top. Also the min-height: 800px; is creating excess page height, so u could try to reduce the value of that, or even remove it completely.

    Not sure what u meant by centering the focus when the page loads, the page looks quite centered to me.

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,483
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by Avs View Post
    Hello,

    This will be my first post here, been lurking for roughly a year now on these forums, which has helped me alot, so it's time i'll start to try and contribute
    Welcome to front of house Glad you decided to stop lurking and thanks for the post which seems to hit the nail on the head.

  4. #4
    SitePoint Guru etidd's Avatar
    Join Date
    May 2011
    Location
    atlanta, ga
    Posts
    632
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Great first contribution!


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
  •