Site logo

Archived topic

Set one block to full width

10 replies · Started by Paul on March 28, 2020

Viewing posts 1–11 of 11

Hi,

Would it be possible to allow one block to be set full width while leaving the page builder container set to default?

At present for a block to span the full width, the page builder container must also be set to full width. While a container block with full width settings will show that in the editor, it will still have default padding applied on the front end (unless the page builder container is changed).

An example page - two paragraphs, one image, two paragraphs - I'd like the option to set only the image to be full width without changing the page builder container, and then having to add another two containers minimum for the paragraphs above and below.

This can be done with other themes/builders, and I'd like to keep the blocks added to a page to a minimum to make sure it's as simple for clients as possible.

Thanks,
Paul.

Hi there,

Are you referring to the container blocks from GenerateBlocks?

If so the full-width option is needed for the page builder container option.

Hi Leo,

The container block from GenerateBlocks yeah. Setting that block to full width in the editor will give the impression it will override page padding, but that's not reflected on the front end. The Page Builder option still also has to be set to full width, otherwise the container block will inherit the same padding as all other blocks.

I wanted to override the padding for one block only, and leave the Page Builder setting as 'default' but it doesn't look like that's possible. Could that be added in the future?

Thanks,
Paul.

There is no plan to make that possible as for now.

I can't see how that would work nicely and make sense as then the theme padding would need to overwrite the padding from container block which would make it very confusing.

You should be able to accomplish whatever you have in mind with full width in page builder container and multiple container blocks though.

I could do it with multiple container blocks but I wouldn't be comfortable then passing that over to a client. I just don't think Gutenberg is user friendly enough for that. I'll scratch it for now.

Thanks for sharing!

If this comes up more often we will definitely take a closer look.

Hi

I think this is actually possible in the alpha 3 version of the plugin. You set full width content, container width to full width and delete the container width value like in this screenshot. This is a popular design by the way :)

What @Jamal has suggested is correct. It is accomplished by GP adding the class 'full-width-content' to the body tag of the page which is exactly the same as setting the page builder container to be full width.

If that is what you want then it is much easier for it to happen automatically when you choose 'full width' for a specific container.

Hi Kar Yung,

Can you open up a new topic? So you could use the private information text fields to provide the necessary details for your site. Thank you.

This archived topic is closed to new replies.