Archived topic
WordPress 5.0 & Container Width
5 replies · Started by Steve on January 20, 2019
For Gutenberg, it would be great if GP had a third container width.
If Container is set to blog width (say 800px), that's too narrow for a home page, for example.
Adding margins to Full Width appears to require different CSS classes for different Gutenberg block types (and I'm not a CSS guy).
Is some way emulate a third container width, say 1,500 px?
Hi there,
So you want to change the container of the home page only?
If so try this:
body.home .site.grid-container {
max-width: 1500px;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know :)
Thanks. That works for home.
What would be the approach for other individual pages?
You can keep adding on the CSS:
body.home .site.grid-container,
body.page-id-xxx .site.grid-container {
max-width: 1500px;
}
We could do it a different way if there is certain logic as well. Like all single posts would be:
body.single .site.grid-container, {
max-width: 1500px;
}
Everything except the single posts would be:
body:not(.single) .site.grid-container, {
max-width: 1500px;
}
You get the idea :)
Thanks, Leo!
No problem :)