Site not centering in IE

I do pretty much the same construction in CSS with the majority of our clients’ sites (mainly because that is what they ask for), so I use #fixcenter a lot since the background is typically different from the content area.

I am doing a slight re-design on top of a major overhaul of the code (was written years ago in just HTML).

Now, taking the CSS from another site I just did 2 days ago (which is centered just perfectly), and tweaked colors and such for this site. However, this site above is not centering in IE (8), but looks just perfect in FireFox (3.6.3).

I know the solution is staring me in the face, but I’m obviously missing something that is amiss.

You probably had text-align:center on the body tag because ie5.x and IE in quirks mode don’t understand auto margins but will centre child block elements when text-align:center rule is applied to a parent.

I fixed it …

I evidently had a weak DOCTYPE. I changed it to:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">

based on this thread:

What is weird is that the old DOCTYPE is being used on the other site I’m building and it’s centered in IE. shrugs and hums the Twilight Zone theme :lol:


My screen resolution is the 1024 x 768 and it’s centered perfectly in FF.

I was told (or saw) elsewhere on these forums last year about doing the min and max width.

What IS the proper way of doing that so the background color (or image, if I’m using one, such as a gradient) is across the whole width of one’s monitor and the content (typically #fixcenter) is centered on the screen?

Thank you for taking the time to help me out.

it’s not centred in Firefox either - on a large screen, why have you a max-width applied to body?