Archived topic
Help with element styling
20 replies · Started by Andrew on February 16, 2021
Hi I am struggling to work out how to remove all the padding in this block element. You can see it on the home page of the url I provided.
Could you please assist?
Thank you.
Hi there,
I'm not sure what part you're pertaining to:
Do you mean to remove the spaces marked in red on this screenshot? https://share.getcloudapp.com/L1uNBDqq
Let us know.
Almost, I added an image to the original post but it doesn't seem to be showing up.
Try this one.
https://imgur.com/a/PWwXk11
The sections with the arrows.
Thanks
I see.
The one from the left side of the columns is added from the "Horizontal Gap" value of your Grid Block as shown here: https://share.getcloudapp.com/DOu2qPQ2
Change it to 0 to remove this padding gap.
The other gaps are a side effect of the image block's alignment not being set to "Full width".
Got it. Thank you. The only problem now, is because the image blocks are full width I don't have any way to size them. How would you go about fixing that?
So you don't want this to be full width?
https://www.screencast.com/t/U4T95WQoDhvY
If so just use the contained container instead of a full-width container:
https://docs.generateblocks.com/article/container-overview/#container
Thanks Leo, but unfortunately that takes us full circle. So how do I remove the padding between the image blocks. I've tried looking at the source and using custom css but it doesn't seem to apply.
OK I'm getting closer. I've added this css but for some reason only the top image follows the styling rules.
.wp-block-image .home-image-1 img {
height: 295.315px;
width: auto;
}
.wp-block-image .home-image-2 img {
height: 295.315px;
width: auto;
}
I'm still seeing the exact same thing as last time.
Perhaps you didn't clear the caching plugin after making the changes?
Please make sure to disable it while we are trying to help.
I have no caching enabled.
Hmm the code suggested that you do:
https://www.screencast.com/t/ysGLnvfYk
Ok you got me. I didn't see it was enabled.
Try again please.
This is what I'm seeing:
https://www.screencast.com/t/bbmAEVq2By
Can you avoid using columns block here?
Try creating this structure:
https://www.screencast.com/t/8R62eXDm
I'm not a designer so honestly, I don't know if I can or not. I used a grid to create the 3 block areas using generate blocks. It created the columns automatically.
My goal is to have the main image, with the 2 side promo images, at a fixed and aligned height with no padding.
Using grid from GB definitely doesn't add columns block automatically.
My goal is to have the main image, with the 2 side promo images, at a fixed and aligned height with no padding.
The structure I've shown here should do that:
https://www.screencast.com/t/8R62eXDm