-
arjona
Hi,
I’m trying to center a grid block with content and image in a container that goes full width. (See linked screenshot).https://i.postimg.cc/7hw4nbLG/image.png
Thank you
-
George
Hello.
It would be nice to see a URL but I will give it a go. You should have a container that wraps the grid or container that you have set the background color to. Try setting the background color to the outer container. If that doesn’t work, you need to set the page to full-width from the Layout setting on the right.

-
arjona
Hi George,
That worked for having the background full width, but the grid block, with the content and image also stretch with it. (https://i.postimg.cc/yYsgW0w2/image.png)How do I have it where the grid box stays centered and at around a 950px width, and not stretched to the edge of the background? (https://i.postimg.cc/7hw4nbLG/image.png)
Thank you,
Lee -
George
Hi Lee,
First of all please remove:
align-items: center; display: flex; flex-direction: column; justify-content: center; justify-items: center; justify-self: center; margin-left: auto; margin-right: auto; text-align: left;from the outer
gb-element-8f72691acontainer.Then, on the grid container add
max-width: var(--gb-container-width)
-
arjona
I didn’t work. Everything just stretched edge to edge
https://i.postimg.cc/5NjtzrXz/image.png
Id like the stretch only the gray background edge to edge and keep the content block and image centered in the middle of the container.
Thank you again
-
Alvind
Hi there,
Select the Grid block (
.gb-element-37cd952b) and set both the left and right margins to auto. -
arjona
Thank you Alvind,
That worked! -
Alvind
You’re welcome!
- You must be logged in to reply to this topic.