Archived topic
Single page - no sidebar centre content
5 replies · Started by Baz on December 1, 2020
Hi,
I currently have the sidebar layout set to Content/Sidebar. But for pages, I have selected 'No sidebar' and 'Default Content Container' in the page Layout options.
This means that in desktop view, there is a blank space where the sidebar should be, and I would like the content to be centred instead.
I have tried the following CSS:
.separate-containers.no-sidebar .site-main {
margin-left: auto;
margin-right: auto;
max-width: 760px;
}
Thanks.
Hi there,
Any chance you can link us to the site in question?
You can use the private information field.
Let me know :)
Hi Leo,
I'm new to GP themes, so using local host to develop my future website.
I don't want a sidebar to appear on pages, so I selected the 'no sidebar' option in the page layout section.
However, on larger screens this means the page content is floated to the left, and I would prefer it to be central - similar to Layout > Sidebars > Content(no sidebars).
Hope that makes sense.
Thanks.
However, on larger screens this means the page content is floated to the left
That shouldn't be the way by default.
Can you create a staging site so we can see the issue?
Thanks.
Hi Leo,
I was using CSS to determine the width of the content and sidebar:
.separate-containers .site-content .content-area {
width: 65%;
}
.separate-containers .is-right-sidebar {
width: 35%;
}
However, if I use GP Premium's Spacing to adjust the widths, single page content remains in the middle. I guess I will just use the Spacing module in future to save the hassle :)
Thanks for looking into this.
No problem :)