WordPress home page not centered

Why is my “Page [0]” not centered in my webpage?

is the closest I’ve found yet to the type of problem I’m having.

Read More

The home page of my site is not centered. When you click on any secondary page it will center.

I have Googled at least 100 times for every article on centering a web page with CSS using several search terms. I have even replaced style.css with a freshly downloaded copy of the theme style.css file with no change.

I fixed one custom template page that was doing the same thing by adding:

<?php get_template_part( 'loop', 'page' ); ?>

I tried doing that with the home page but it still did not fix it. The home page will still not center.

The theme is supposed to be HTML5, I ran it through a validator and it gives errors for the rel statements, but that should eventually be fixed when they get the validator updated. No relevant CSS seems to be a problem to the validator.

When I do clear: left in #primary of the Layout section, it fixes the problem, but the right sidebar widget goes down the page.

I also fixed the duplicate #wrapper entry that comes as a default with the Twenty Ten theme.

I don’t recall having the problem before the WordPress 3.2.1 update, but then again I may not have noticed it.

It’s the same in Firefox and IE.

You can see it at http://www.danmctaggart.com

Related posts

Leave a Reply

1 comment

  1. It isn’t programming related at all.

    Your homepage is not very tall, so it doesn’t have a vertical scroll bar. Your other pages are. It seems like it isn’t centered, but it’s really just re-centering with the addition of a scroll bar on the right.