Archived topic
How to change the container width of my posts?
9 replies · Started by Max on January 28, 2022
Hi i want to change the container size of the white background. in the generate blocks i already changed it, but the white background keeps at 1080px i think. How can i change this for all my posts?
Hi there,
if you want to change the content width of all your posts then use a Layout Element:
https://docs.generatepress.com/article/layout-element-overview/
The container keeps the same. I changed it to 850px. Is this the good spot check picture?
Hi Max,
I'm not seeing a layout element has been set up to adjust the content container width.
Can you give it a try?
How do i fix the same height en width in the feature image?
Cause the one i have rn i want less high
How do i fix the same height en width in the feature image?
Are you sure? Then the image would be 900px * 900px.
Give this CSS a try, I'm sure you wouldn't like it :)
.gb-container.gb-container-6503a66f img {
aspect-ratio: 1/ 1;
}
Oh i am really sorry.
The same height in all posts. But of course not square ;) could you please explain about the aspect ratio. Cause i have no clue how all picture that i in the future will upload as feature image will have the same size
I see what you mean ;)
You can try this CSS:
.single-post img.dynamic-featured-image {
height: 330px;
width: auto;
object-fit: cover;
}
Here's the explain of aspect ratio:
https://css-tricks.com/almanac/properties/a/aspect-ratio/
Can you check? It doesnt cover the whole thing now
It looks fine to me:
https://postimg.cc/LYHLFG2M