[Resolved] Content container / GB container front-end results

Home Forums Support Content container / GB container front-end results

  • This topic has 3 replies, 2 voices, and was last updated 5 months ago by Elvin.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1464464
    Paul

    Hi

    Can you tell me what causes two different layouts between the URLs below? Container block on both pages set to full width, content container on both pages is set to full width…but the front end result is different?

    Container on the second URL has a grid block inside, no grid block on the first page.

    Full width v contained layouts is something I still struggle to understand with GenerateBlocks.

    Also, would it be possible for the container block to automatically inherit the container padding set in the customizer? Is there a reason this doesn’t already happen?

    Thanks,
    Paul.

    #1464520
    Elvin
    Staff
    Customer Support

    Container block on both pages set to full width, content container on both pages is set to full width…but the front end result is different?

    The result is different because the layout is 100% different. Container block and grid block may seem similar at times but they serve their own difference purpose.

    The second URL’s, as you mentioned, uses Grid block placed inside a container block.

    This grid block uses display:flex css property. Its intended purpose is to display rows and columns which is basically what you see on the second URL. (1 row, 2 columns per Grid Block)

    On the other hand, first URL uses plain container block inside a container block. Container blocks serves plainly as a container with no special layout.

    That said, the first page’s container block layout pretty redundant unless of course you want to purposely have an extra <div> wrapper for your contents for whatever purpose. Ex: making contents take only 50% width

    Also, would it be possible for the container block to automatically inherit the container padding set in the customizer? Is there a reason this doesn’t already happen?

    These blocks have their own settings specified on the plugin unless purposely overwritten by CSS.

    While it is possible to make these blocks inherit the settings on the customizer, it is tedious because you have to check its parent element, grandparent element, great grandparent element and so on to make sure they don’t have their own paddings that’ll prevent your block from inheriting the customizer paddings.

    A wise man once said:
    "Have you cleared your cache?"

    #1467439
    Paul

    Hi, thanks for your detailed reply. I’ll definitely keep this for reference 🙂

    #1467900
    Elvin
    Staff
    Customer Support

    Awesome. No problem.:)

    A wise man once said:
    "Have you cleared your cache?"

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