Site not centered in IE?

Discussion in 'HTML & Website Design' started by terminator69, Apr 23, 2008.

  1. #1
    Is this site centered for you in IE? this is the first time I've ever looked at it in IE and it seems to be to the left.

    http://pccurb.com
     
    terminator69, Apr 23, 2008 IP
  2. mjewel

    mjewel Prominent Member

    Messages:
    6,693
    Likes Received:
    514
    Best Answers:
    0
    Trophy Points:
    360
    #2
    It's to the left in ie7. Try something like this:

    replace:

    #page {
    width: 100%;
    border: none;
    background: none;
    }

    with this:

    #page {
    width: 100%;
    border: none;
    background: none;
    margin: 0 auto 0 auto;
    }

    This is untested.
     
    mjewel, Apr 23, 2008 IP
  3. terminator69

    terminator69 Notable Member

    Messages:
    4,872
    Likes Received:
    260
    Best Answers:
    0
    Trophy Points:
    230
    #3
    Ok gave that a try and it still seems to be to the left.
     
    terminator69, Apr 24, 2008 IP
  4. mjewel

    mjewel Prominent Member

    Messages:
    6,693
    Likes Received:
    514
    Best Answers:
    0
    Trophy Points:
    360
    #4
    Ok, I found the problem. Your original css is fine, but in your page code the following should be at the very top of the page before the title:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <title> PC Curb - Take your PC to the nex-G! </title>


    Tested and centers in ie7.
     
    mjewel, Apr 24, 2008 IP
    terminator69 likes this.
  5. terminator69

    terminator69 Notable Member

    Messages:
    4,872
    Likes Received:
    260
    Best Answers:
    0
    Trophy Points:
    230
    #5
    Thanks, works fine. :D
     
    terminator69, Apr 24, 2008 IP
  6. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Should also now center in IE6. Will still not center in IE5.5 if you care.
     
    Stomme poes, Apr 24, 2008 IP