Archived topic
Playing around with Customizer Added Margin
15 replies · Started by Sandee on May 18, 2017
Hi,
I am working on a site and just playing around with the customizer a bit. I was in the customizer to try to add a page header to the blog page. After doing that, I noticed my home page had added margins (top and bottom full width of the page, right full height of the page). This is the second time this has happened. Am I doing something wrong? How can I fix this and make sure it doesn't happen again?
Thank you!
Hi Sandee,
Blog page header shouldn't be adding margin.
Can you provide a link to your site? Thanks!
Sure -- it's https://my2911creative.staging.wpengine.com. I'm actually still playing around with customizer functions (this time with container width), and the margin shifted again.
If you are using Beaver Builder then you shouldn't have to play with GP's container width too much.
Try checking Full Width: https://docs.generatepress.com/article/page-builder-container/
Let me know.
Actually, yes, that was set to FULL WIDTH. I wasn't playing the container width on the home page. I was actually just in the customizer playing with the container width setting -- I didn't make any change at all to the home page, but the result is / was the added margin.
Hmm can try setting the sidebar layout to content: https://docs.generatepress.com/article/sidebar-layout/
and separating space to 0: https://docs.generatepress.com/article/separating-space/
That fixed it in the customizer view, but not on the page (even viewed via incognito and / or a different browser). This happened one time before, and I just started over again because I thought I'd made a mistake. Should I do that again?
This is a multisite install if that matters.
Any caching plugin?
No, no caching plugin. I do use Cloudflare for DNS management though I don't think that matters on a staging server. Either way, I just enabled developer mode and cleared my browser cache once again.
Usually it's a caching issue if it works in the customizer view but not in live site. Perhaps server caching?
I still see this CSS which is adding the margin:
.right-sidebar.separate-containers .site-main {
margin: 20px 20px 20px 0;
}
Could try this to remove it for now:
.right-sidebar.separate-containers .site-main {
margin: 0 !important;
}
I wonder why GP thinks the right sidebar is displaying when it's not. Is your sidebar layout set to right sidebar?: https://docs.generatepress.com/article/sidebar-layout/
No, the sidebar layout is set to content (no sidebars), and the page builder container is set to full width.
Is there a way for me to fix this? I am trying to move on, but I'm a bit stuck until I can fix it since it is on the home page.
Thank you!
Is the on page sidebar layout option set to Default?: https://docs.generatepress.com/article/sidebar-layout/#different-sidebar-layouts-for-individual-pages-and-posts
There's no reason the .right-sidebar class should exist if the layout is set to no sidebars. I believe figuring this out will remove the gap.
Thanks for your response -- I fixed this by removing a function I had added to force the 404 page to full width. I'll have to figure out what I did wrong there, but for now, I've just removed it.
Thanks for your patience! :)