Archived topic
Home page off-center
12 replies · Started by danhotchkiss on November 21, 2021
I can't figure this out!
All of a sudden, my home page (and no other) is left of center! I can't see any difference between it and any other page that could cauae this.
This happened when I was working on getting the Footer widgets centered relative to the body of the page. Good news: the footer is now centered on the home page. Bad news: it's off-center withe the header and all my other pages!
Hope you can help.
Many thanks,
Dan
Hi there,
The link you've provided doesn't work for me.
Can you confirm?
Sorry. I've been experiencing frequent outages at GoDaddy. Try this.
Hi Daniel,
You have this CSS which is causing the issue:
#content {
max-width:1250px;
}
Can you remove the CSS and use a layout element instead?
https://docs.generatepress.com/article/layout-element-overview/#content-1
You can set the container width within a layout element.
Let me know if this helps :)
Thank you very much Ying - Each time you help, I try to retrace your steps so someday I will be smart too!
Now - do you have any idea why my footer widgets are off-center with the rest of the page?
Best wishes.
Dan
Now – do you have any idea why my footer widgets are off-center with the rest of the page?
Try set the image block in the footer widget (right side) toalign center.
Let me know if this works :)
Are you thinking I'm using the widget block editor? I'm not, because when I do I get errors. I've entered the footer widgets into the classic widget editor.
When I deactivate the Classic Widgets plugin, The top of the Appearance-Widgets page says: "The "custom_html" block was affected by errors and may not function properly. Check the developer tools for more details." Individual widgets get other errors, which I can send if that's helpful.
I would love to use the block editor for widgets - and this situation is a good example. But I have not figured out how to make it work.
Thanks,
Dan
Looking at your site, I think you don't need CSS or a layout element to specify the content width, you can simply change the content container to 1250px at customizer > layout > container.
And for the footer, is the image a image widget? There's no align option available? I don't have the legacy widget editor in my install already, can't recall what it used to look like.. lol..
If you can't find any align options, then try this CSS:
.footer-widget-3 figure {
margin: 0 auto;
}
The CSS seems to have worked. As a side effect of this or some other change, though, all of my pages except Home and Calendar (which has its own layout element) are no longer centered on the screen. How do I fix this?
Thanks so much,
Dan
Hi Dan,
Are you trying to make it display like this for all pages?
https://share.getcloudapp.com/p9uNBPRO
If so, try this CSS:
.footer-widgets-container {
max-width: 2000px;
margin: 0 auto;
}
.footer-widgets-container .widget,
.footer-widgets-container .widget > * {
text-align: center;
margin: 0 auto;
}
Thank you, this did the trick.
No problem. :D