CSS Question

Mike

New member
Jun 27, 2006
6,777
116
0
51
On the firing line
Got a page that centers just fine in Firefox, but sits on the left side of the page in IE. I used to know of a workaround, but for the life of me can't find it anymore.

Can someone help out?

This is what I've got controlling the content alignment:

Code:
body {
    background-image: url(images/bg.jpg);
    background-repeat: no-repeat;
    background-position: center top;
    margin:0;
    padding:0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #000;
}
#wrapper {
    margin-left:auto;
    margin-right:auto;
    width: 1000px;
    background-color: #FFF;
    z-index: 100;
}
.content {
    margin-left:auto;
    margin-right:auto;
    width: 800px;
}
 


body {
background-image: url(images/bg.jpg);
background-repeat: no-repeat;
background-position: center top;
font-family: Arial, Helvetica, sans-serif;
background-color: #000;
}
#wrapper {
margin:0 auto;
width: 1000px;
background-color: #FFF;
}
.content {
margin:0 auto;
width: 800px;
}

This is it
 
@jaranen - tried that and it didn't solve the problem

@nickCR - I think you're right. I read that somewhere else. Gonna play around with it a bit
 
That trick shouldn't be necessary, I use the margin-left / margin-right auto all the time and have not seen that, so I'm not sure why it's causing that problem.

I would just do the most basic doctype... <!DOCTYPE html>