Archived topic
set specific Container Width for blog posts
12 replies · Started by anabella on May 29, 2018
Hi,
I need to set a specific width for blog posts but I can´t find this option on the customization section. Should I do it through CSS? In that case, what should it look like?
Thank you in advance.
Hi Anabella, the CSS to change the post content width is like so:
.single .inside-article {
max-width: 800px;
margin: 0 auto;
}
Hi David,
Thanks. I´ve tried it but it changes the content width of my pages as well.
How can I limit it only for blog posts?
Thanks
Hi Anabella, oops... i have edited the code above to apply only to the single post
Great, thanks for your help David!
You're welcome Anabella
Hi, David!
Thanks for this CSS code, I was also looking for the same.
I want to know how to change the background colour of outside the content area?
as many Popular blogs do, here is an example...
Activate Colors module from Appearance>GeneratePress and then go to Appearance>Customize>Colors>Body>Body Background Color and change the colour to whatever you want.
Hi Ravi,
If you need more help on this, please open a new topic for your question.
Thanks!
Hi David!
This code affects the single product page on WooCommerce.
Any form to affect (only) the single post page?
Thanks :)
You can actually create a layout element for it instead of using CSS now:
https://docs.generatepress.com/article/layout-element-overview/#content-1
Please open a new topic if you need more help on this.
Thanks!
Wow! Very happy to see this function! Amazing :)
Thank you so much
No problem :)