Problems centering template on page

Discussion in 'HTML & Website Design' started by mariush, Apr 18, 2007.

  1. #1
    I was asked by a friend to change the layout of a template so that the content layer is the first on the page.

    It loads fine in Firefox but IE does not center it. I have a feeling it's because I'm using position:absolute to set the top corner of the tags without specifying the left coordinate.

    I've uploaded the template here: http://www.definethis.org/template/index.html

    Can you tell me how should I change to CSS file so that the template is centered in IE ?

    Any help is much appreciated.

    Thank you guys (and girls).
     
    mariush, Apr 18, 2007 IP
  2. pixel_dust

    pixel_dust Peon

    Messages:
    151
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I would get rid of the absolute positioning and float your divs
    if you wrap the content of your site in a wrapper div you can position it with margin:0 auto; to be center-aligned


    vanessa.
     
    pixel_dust, Apr 18, 2007 IP
  3. mariush

    mariush Peon

    Messages:
    562
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you Vanessa.

    You're right, I would have done it just as you say. It's just that he insists on having the actual content first thing on the page.

    For the moment I got around this problem using a Javascript function that is called about 10 times per second and moves the divs where they should be -in the center of the window- if the window gets resized.
     
    mariush, Apr 18, 2007 IP