Wordpress Site Static Front Page alignment issue

Hello all.

I am having an issue with a site i am building in Wordpress.
Im using a static front page. For reasons unknown to me my entire front page is now aligned left, while the rest of the site is centered as it is supposed to be.
I cant figure out what i could have done to cause this.
It was perfectly fine (centered) when i logged off one day, and the next day when i visited the site again the front page had shifted left.
I cant figure out how to correct this in the css without negatively affecting the other pages.

Anyone have any idea how this could have happened?
the site is on my testing server: mydomainsample.com/ai

i can post any code either in this thread or in a private message on these forums.

Thanks in advance.

This line in your CSS is causing the problem:

.home {
width: 60px;

Remove that and all swell. What was that line of code meant to achieve?

it was meant to specify the width of the home button in the navigation.
I dont understand why that would move the page left, but thanks for the help. i never would have guessed that.

Ah, but the class was applied to the body element, meaning that you wanted the whole page to be only 60px in width. Luckily, the content peeked outside that enough to be seen.

To apply a width to a button, apply a class directly to the button.

i did apply the class directly to the button. the home button in the nav was <li class=“home”>.
how did it get applied to the body element? is that something that was written into the template or Wordpress itself?
i wrote the css class specifically for the nav and applied it as i stated. I didnt apply it to anything else - at least not intentionally.

Ah, I see. The template you are using already has a class of “home” applied to the <body> element:

<body class="[COLOR="#FF0000"]home[/COLOR] page page-id-17 page-template-default custom-background">

I guess you have to be careful with things like that if using a template made by someone else. Perhaps choose less obvious classes like “hme” or “home-button” just in case. :slight_smile:

gotchya. Thanks again :slight_smile:

I’m having the same problem. My page is centered and looks fine, then I set it as the front static page for my website and suddenly its all shifted to the left of the screen. Anybody have any answers?

If we see a link, it should be easy to answer. :slight_smile: