• My site is center aligned in firefox due to the following CSS:
    #page {
    background:url(images/body.png)
    repeat-y center;
    text-align:left;
    width:760px;
    margin:20px auto;
    }

    In IE, however, the entire page is left aligned. I have tried messing around with some IE CSS hacks, and this is the closest I’ve come to a desirable effect:
    /* Start Hide from non-IE/Win */
    * html #page {
    margin-left:20%;
    }
    /* End Hide from non-IE/Win */

    However, this only looks good at 1280×1024 desktop resolution. I bring it over to my second monitor, which runs at 1024×768, and the page seems to favor the right side of the window. Now, I know why this is. But what I don’t understand is why IE has such a hard time centering it. margin:20px auto; should do the trick, just as it does in IE.

    If there is some way of getting IE to center the page, that would be beautiful. If not, however, a left-aligned page isn’t all that bad.

Viewing 7 replies - 16 through 22 (of 22 total)
Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘Page centered in Firefox, left aligned in IE?’ is closed to new replies.