Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Containers in Grid squeezed

  • Hello!
    I don’t know if I can specify correctly what I need.
    I have a full width container, in which I want to place a 1200px wide container, in which I want to place a grid with two columns. When trying to achieve that the containers of the grid queeze themselves around the middle of the grid and don’t fill the 50% space I want them to fill.
    I must have set some basic settings wrong…?

    Thank you,
    Angie.

  • Hi there,

    Not sure I’m seeing the issue you described, it looks normal.

    The 2 Grid containers are 50% each:
    https://app.screencast.com/XsxtZDP1X1KZj

  • Actually I want to specify my question. When the containers of the grid are filled to an amount I don’t know with content the width is 50%, but when it contains only a short heading and a button, the width is not 50%. So I was wondering, which setting makes them have 50% width independent of the content? Does that make sense?
    Thank you!

  • Hi there,

    This is one of the oddities of using Display Flex on a Container.

    A Grid Block ( the parent wrapper ) has no actual Width defined so it will by default fill its parent containers width if the the parents Layout > Display = Block.

    In this case the parent containers Layout > Display = Flex.
    Flex will allow its children, to resize them selves and when that child has no width it will take the max/min content width of its children. Which is why columns with longer content expand the grid to fill the parent.

    To fix that, make sure the Grid Block is in a Container with a Layout of Display Block.

  • I see! I chose “Flex” because I wanted the child containers to be aligned in the center… Is there a way to do that when the parent container has “display block”?
    Thank you!

  • The layout you have is:

    Container Block #1 – Full Width
    —- Container Block #2 – contained with flex
    —- —- Grid Block

    Container Block #2 is the problem. block, and I can’t see why you need Display Flex on that ?
    As it is centered by its Auto Margins.

    What am I missing ?

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.