Remove Gaps Between Blocks
-
I am using Astra with just the WP default page builder.
I am trying to remove the top and bottom gaps between all blocks and found some CSS to set margin to zero but can only find individual CSS for separate blocks.
I still need to find one for removing the gap on a gallery block.Once the margins are zero I then use the spacer to adjust on a white background where the text is too close to the bottom or top.
And if that paragraph block has a coloured background I add another paragraph block underneath and then colour it the same but do not write anything in it. This then has the effect of increasing the margin in a colour.
Is there such a thing as a coloured spacer I could use instead of my adding an empty coloured paragraph, as that trick gives me the extra margin in the colour but I have no control over its depth.I am finding that I do not need a zero margin when the paragraph has a white background. Could I use a CSS to only apply a zero margin on a paragraph block if it has no background colour.
My hacks work and I am pleased with the result but is my method bad/ making it hard work for myself.
Here is the CSS I placed in my additional CSS. Is there a simpler way.
Sorry for all the questions.p { margin-bottom:0!important; } h1,h2,h3 { margin-bottom:0!important; } .entry-content > *, .wp-block-group > *, .wp-block-columns > * { margin-top: 0 !important; margin-bottom: 0 !important; }
- The topic ‘Remove Gaps Between Blocks’ is closed to new replies.