-
Hello,
how can I create colored sections full width like in the following example?
-
Hi there,
You can achieve that layout easily by:
1. Setting the content container to full width:
Individual pages using the Layout metabox:
https://docs.generatepress.com/article/layout-metabox-overview/
https://docs.generatepress.com/article/content-container/If this layout will be for every page then you can create a Layout Element for it:L
https://docs.generatepress.com/article/layout-element-overview/#content-12. Add a GB container block for each section:
https://docs.generatepress.com/article/layout-element-overview/#content-1Let me know if this helps 🙂
-
Hi Leo,
okay, but how can I manage, that the content padding is exactly like the content which is not in this full width container? So that all the content on the website has the same spacing.
-
Alvind
Hello there,
You can set the content container width in Customize > Layout > Container Width.
This setting will apply the specified width to every inner container. You can then add content inside this inner container so that your content doesn’t stretch to full width.
https://docs.generateblocks.com/article/add-inner-container/
-
Hello,
I meant the following:
If I have a normal page with text without a container.
Then I want to add such a container for a colored section.
How can I manage, that the content padding is exactly like the content which is not in the container?
-
David
Hi there,
the methods mentioned above are still the way to go.
Just treat every section the same way, whether it has a background color or not, just add a Container + Inner Container for that too. -
Hello David,
I have a normal page with text, without any containers. Now I want 1 colored Section.
You mean to get 1 colored section, I have to put all the other text also in containers?
-
I have a normal page with text, without any containers. Now I want 1 colored Section.
Yes, you need to make the page’s content container full width in order to have full width GB container.
I would recommend going with Leo’s method. And yes, you will need to set paddings for each GB container.
-
Okay, then this is not doable for me.
I Thought there must be an easier way to create one simple colored section.
But if I have to change the entire content of the existing page to do this, it’s not practical for me.
-
Alvind
Hi there,
Could you share the existing page that you’re referring to? That way, we can give more thorough advice based on your requirements.
-
I will do when it is live.
-
Alvind
Just let us know when that’s done 🙂
- You must be logged in to reply to this topic.