[Resolved] Full Width Background using Generate Press Theme
This thread is resolved. Here is a description of the problem and solution.
Problem:
Full-width backgrounds with Generate Press and Layouts are not completely full-width.
Solution:
The Template Layout can occupy as much space as the theme allocates to the content area (and that includes any background styling), so the first step is to make sure the theme settings (set in the theme options for that Layout) are full-width.
I am trying to get a full width background to display using layouts when using the Generate Press theme. For example, I'd like to know how to create a background image, or color that extends the full width of the layout row, if specified.
However the background does not want to extend the the edges of the browser. I did have to add some CSS to get Generate Press to work properly with Toolset referenced here: https://toolset.com/forums/topic/problem-with-generatepress-can-not-create-full-width-container/ and here hidden link where Generate Press settings are getting overwritten by Toolset loading the 15px margins from bootstrap automatically and they said to add the following CSS to prevent this.
I think there is a problem though in that anytime I set the row to full width and then add a colored background, the background does not extend to the full width of the row, it stays within the container for the page. Exactly what CSS is needed to create a full width row in Layouts, that will extend the the full width of the browser when using the Generate Press theme? Please include the exact CSS to add in and the tags to add to the row, with an example for a colored background and a background image.
The Template Layout can occupy as much space as the theme allocates to the content area (and that includes any background styling), so the first step is to make sure the theme settings (set in the theme options for that Layout) are full-width.
At the highest level that creates a full-width wrapper div with classes of .grid-container and .container. As you have noted, there is a clash with the Bootstrap styles for container, which sets padding of 15px on either side.
So you will need custom CSS that overrules that.
When you edit the Layout row settings, as shown in your own screenshot, you can also add a custom class to the row to enable you to target it for styling, e.g. you might add a class such as custom-background and can then style it like so: