Site logo

Archived topic

Extra spacing on first container when using GP/GB

13 replies · Started by Fabien on December 14, 2022

Viewing posts 1–14 of 14

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

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.

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.

Hi @Fernando

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

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 ?

Hi @David,

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

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.

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 ?

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

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".

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

Good call, thanks @David

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

This archived topic is closed to new replies.