Site logo

[Support request] Extra spacing on first container when using GP/GB

Home Forums Support [Support request] Extra spacing on first container when using GP/GB

Home Forums Support Extra spacing on first container when using GP/GB

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #2461833
    Fabien

    Hi,

    When creating a loop template, GP/GB add an extra margin-bottom on the first container because of this code :

    .sidebar .widget, .page-header, .widget-area .main-navigation, .site-main > * {
        margin-bottom: 40px;
    }

    Is it an expected behavior ?

    Thanks

    #2462085
    Ying
    Staff
    Customer Support

    Hi Fabien,

    You can wrap the query loop block with a container block, then set the container block’s margin-bottom to 0 to override the theme style.

    #2462482
    Fabien

    Hi @Ying,

    Actually, the margin-bottom is applied to a container block. I’ve tried to force a margin-bottom : 0; but GP is overriding it.

    #2462494
    Fernando
    Customer Support

    Hi Fabien,

    For reference, can you provide the link to where we can observe this issue?

    You may use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    #2463918
    Fabien

    Hi @Fernando

    Please check example in the private information field (gb-container-6e3ad366)

    #2463979
    David
    Staff
    Customer Support

    Hi there,

    i do not see the Margin Bottom property on that Container Block. What happens if you set it to 1px instead of 0 ?

    #2463994
    Fabien

    Hi @David,

    I’ve just applied the margin-bottom : 0 but you can see it’s overwritten by GP rules.

    #2464017
    David
    Staff
    Customer Support

    Ah its because the themes dynamic CSS is loading after the GB styles are.
    For now can you treat it with some CSS ?

    Ill make a note of this to see how we can improve on it in the future.

    #2464047
    Fabien

    Yes I’ll fix it using some CSS. My main goal was to flag the issue so it can be solved on futures updates.

    I’ve also notice a “bug / weird behavior” when creating a block hero template for an archive page using a column layout. Should I open a new thread ?

    #2464054
    David
    Staff
    Customer Support

    We may as well keep it in this one.
    Where can i see the issue ?

    #2464102
    Fabien

    If you create an Element > Block > Hero > Before Content Container, when using a multi column layout on an archive page, the content of the element goes out of the div.

    Now if you switch to a single column layout, the issue “disappears”.

    #2464118
    David
    Staff
    Customer Support

    Ok, set the hooks priority to 9 this will move it before the generate-columns-container

    #2464168
    Fabien

    Good call, thanks @David

    #2464171
    David
    Staff
    Customer Support

    You’re welcome.
    Thanks for the feedback on the other issue!

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