user192618
user192618

Reputation: 99

Content not centered on one page in IE

I've taken over maintaining this site from a previous developer.

The content of each page is inside a div container of class "ct" which has a auto margin on the left and right (to center the page).

For some reason, this page, does not center the content in all versions of IE (up to and including 9).

In all other browsers, this works fine.

I've looked it over and ran the page through the W3C Validator but there aren't any markup errors that would cause this problem.

This page seems to be built the same as others. Note that I did not develop this site and it is not my markup.

Upvotes: 0

Views: 236

Answers (1)

Christian Kuetbach
Christian Kuetbach

Reputation: 16060

It is all about the quirks mode.

Click to F12 and you'll see it is rendered in quirks mode.

Disable quirks, by setting a valid doctype and the content is centered.

update

<!--  DUMP REQUEST 

Array
(
    [__utma] => 6046321.1674104794.1344361223.1344361223.1344361223.1
    [__utmb] => 6046321.1.10.1344361223
    [__utmc] => 6046321
    [__utmz] => 6046321.1344361223.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
)
 -->

This code is printed before setting the doctype, so there is no doc-type. The doctype has to be the first line.

Upvotes: 1

Related Questions