Archived topic
How to set specific content width for full-width post?
5 replies · Started by Aliaksandr on April 11, 2018
Hello.
Most of my posts (which use "Content / Sidebar" template) are 728px wide.
For some posts, I want to use "Content (no sidebars)" template and I still want them to be 728px wide. By default they are 1080px wide.
How do I change them to 728px too using CSS?
Thanks.
Hi there,
Try this CSS:
body.single.no-sidebar .site.grid-container {
max-width: 728px;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
It worked. Thank you very much!
No problem :)
Hi Leo,
Should I use different CSS for homepage without sidebar?
For home page it would just be:
.home .site.grid-container {
max-width: 728px;
}
If this doesn't work, any chance you can open a new topic?