tim_getdim — 2012-07-02T11:24:43-04:00 — #1
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.
ralphm — 2012-07-02T22:00:00-04:00 — #2
This line in your CSS is causing the problem:
Remove that and all swell. What was that line of code meant to achieve?
tim_getdim — 2012-07-03T09:30:38-04:00 — #3
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.
ralphm — 2012-07-03T09:36:51-04:00 — #4
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.
tim_getdim — 2012-07-03T09:47:45-04:00 — #5
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.
ralphm — 2012-07-03T09:56:07-04:00 — #6
Ah, I see. The template you are using already has a class of "home" applied to the <body> element:
<body class="<font color='"#FF0000"'>home</font> 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.
tim_getdim — 2012-07-03T09:57:53-04:00 — #7
gotchya. Thanks again
gskinner — 2013-01-18T11:08:36-05:00 — #8
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?
ralphm — 2013-01-20T09:02:01-05:00 — #9
If we see a link, it should be easy to answer.