Centering my page

Discussion in 'HTML & Website Design' started by cro91, Sep 30, 2011.

  1. #1
    I'm looking for some help on trying to figure out what is wrong with my page. I am trying to center the page so when you resize it the left side does not go negative like it currently is, right now when you resize the window the left side goes out of view and you cant see it again without maximizing the window .I know that it has a fixed width and that its because of the "whiteback" div. What I was wanting to know is if I am going to ultimately have to replace all of my elements to get it to look right or if there is a fix that would work.Link to the site: http://www.red planet anime.com
     
    Solved! View solution.
    Last edited: Sep 30, 2011
    cro91, Sep 30, 2011 IP
  2. cro91

    cro91 Peon

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Ok I thought I had it fixed then I refreshed my page after editing whitebg and its not working again :(
     
    Last edited: Sep 30, 2011
    cro91, Sep 30, 2011 IP
  3. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #3
    So which is it?
     
    drhowarddrfine, Sep 30, 2011 IP
  4. cro91

    cro91 Peon

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Man I don't know now haha... I edited the post. My brain is fried after learning PHP and MySQL this week. Just got finished trying to work out a way to search the database using checkboxes for genres on my search page. Centering it was the least of my problems but obviously I was mistaken
     
    cro91, Sep 30, 2011 IP
  5. cro91

    cro91 Peon

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    So anyone know of any solution to why the width-left:auto; is not working? I'm still stumped.
     
    cro91, Oct 1, 2011 IP
  6. #6
    Sorry. I thought this was fixed. Nice looking site, btw.
    It's your method of centering which will always put everything in the center at the expense of the sides. I'll edit this post in a second with the fix.

    EDIT:
    To your #wrapper, add 'margin:0 auto'

    To your #whiteback div, combine all the margins to 'margin: 0 auto 15px' and remove the 'left:50%'
     
    drhowarddrfine, Oct 1, 2011 IP
  7. cro91

    cro91 Peon

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks for the complement! Its nice hearing it from some one else. :p

    Your method worked! You are freaking awesome, take pride in that today you are my hero! hahaha.
     
    cro91, Oct 1, 2011 IP