Archived topic
Set Home Page To Different Width
3 replies · Started by Simon on March 24, 2019
Hey Guys,
I currently have the sites width set to 1100px for the header and categories. I am then using:
.single .inside-article,
.page .inside-article {
max-width: 750px;
margin: 0 auto;
}
To set the width of my pages and posts. However the home page is more like a category than a page or post. Any thoughts on the best way to achieve an 1100px width on just the home page would be awesome.
Cheers,
Simon
Hi there,
Try this CSS:
.home .site.grid-container {
max-width: 1100px;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Just a note that this option has been added to the Layout Element in the next version of GP Premium which is currently in alpha testing:
https://generatepress.com/gp-premium-1-8/
Thanks Leo,
I didn't realize their was a css class for home page.
I ended up using:
.home .page .inside-article {
max-width: 1100px;
}
the .site.grid-container didn't work for some reason.
I did see that update coming, looking forward to it. I guess I'll try my best to migrate to doing things through the update instead of custom css when its released.
Every page has a unique ID in the body tag :)
Glad it's working!