Archived topic
Limit only the text (blogposts) to a certain width
6 replies · Started by Samuel on March 21, 2021
Hi,
i wana Limit only the text (blogposts) to a certain width. I Use
body.single .site.grid-container {
max-width: 780px;
}
But then the images will also be limited. but i want the images to go all the way to the edge.
Hi Samuel,
It's not possible to use CSS as everything is within the same container.
The best solution would be to use multiple container blocks with GenerateBlocks :)
Hi Leo,
ok, thanks for the input. I have tested it out, Please have a look at the live page.
The content is in a container with an inner width of 780px (For long blogposts this is easier to read). wide width for images should still have 1100px.
However, the images do not go over the wide width as with the TT1 theme from Wordpress (see screenshot). This is probably due to the inner width of 780px... But then what is the function: Wide width (for the images)? Full width actually goes to the browser border. That would be really great if the "wide width" function respected the 1100px.
I would like to add this post: https://github.com/WordPress/gutenberg/issues/27473#issuecomment-796773866
Please have a look at the part "Layout / Spacing". There are two possibilities: Content width and Wide width. Every image I want to have wide, I would have to set it that way, of course. But to put a div container around every paragraph is bad :-)
Also see: https://www.billerickson.net/full-and-wide-alignment-in-gutenberg/
Hi there,
the default AlignWide method as used by WP core and GP - simply eliminates the Container padding thats is set inside the Customizer. When you remove that padding and use a GB Container in its place there is no way to evaluate that padding difference.
Hi David,
yes that makes sense. Thanks!!!
You're welcome