Site logo

Archived topic

content without sidebar using full container

6 replies · Started by Aaron on March 18, 2021

Viewing posts 1–7 of 7

Im trying to create a new homepage without a sidebar - that uses the full width that the content and the sidebar usually would.
Ive tried using the info here: https://docs.generatepress.com/article/content-container/
but it doesnt allow me to use the sidebar space?

Thanks

BTW the page I linked is the test page - the current homepage works but it is using elementor - which I am trying to get rid of.

Hi Aaron,

Is your home page a static page?

If so, you can go to layout meta box > content container, choose full width.
https://docs.generatepress.com/article/layout-metabox-overview/
https://docs.generatepress.com/article/content-container/

If it's the blog/posts page, then layout element would be what you are looking for.
https://docs.generatepress.com/article/layout-element-overview/
Choose full width under content tab, choose front page under display rule tab.

Let me know how it goes :)

Hi there,

Its a static page and I have tried that with no success - you just get the outcome in my link.

Im wondering if it has something to do with the CSS to accomodate mediavine ads in the sidebar?

@media (min-width: 769px) {
#right-sidebar {
width: 350px;
}

#primary {
width: calc(100% - 350px);
}
}

@media (max-width: 768px) {
#right-sidebar {
display: none;
}
}

Hi there,

try changing that CSS to this:

@media (min-width: 769px) {
  #right-sidebar {
    width: 350px;
  }

  .right-sidebar #primary {
    width: calc(100% - 350px);
  }
}

@media (max-width: 768px) {
  #right-sidebar {
    display: none;
  }
}

The #primary element will now only resize if the right-sidebar is present on the page.

That did it! Thank you!

You're welcome

This archived topic is closed to new replies.