Skip Navigation

[Resolved] How can I manage container block margins in the block editor?

This thread is resolved. Here is a description of the problem and solution.

Problem: I have set the margin around my Container block to 0, but I still see space between the blocks. How can I remove that space?

Solution: In this case, the space is added by the theme. Add a group block and place the containers in the same group, or add custom CSS to override the theme's styles.

This support ticket is created 4 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 2 voices.

Last updated by Christian Cox 4 years, 4 months ago.

Assisted by: Christian Cox.

Author
Posts
#1388255

Christian, I have another issue with trying to remove gaps between containers/blocks in the editor. Please see video to see problem - hidden link

#1388263
Screen Shot 2019-11-20 at 3.15.58 PM.png

Okay I inspected the purpose-driven-website page and I can see that this margin is applied by some CSS added in a style tag called "generate-style-inline-css". I'm not exactly sure how this CSS is generated, but I assume it's coming from GeneratePress somehow. I'm attaching a composite screenshot here showing what I mean. You can see that the margin-bottom attribute from this generate-style-inline-css style tag is being applied to the block. That has nothing to do with Toolset as far as I can tell. I checked in the Customizer and didn't see this specific style added anywhere, so I'm a bit stumped.
https://generatepress.com/forums/topic/why-does-gp-stick-a-heap-of-inline-css-in-my-header/
It might be added by the theme automatically for some reason. In that case, you could override it with custom CSS, or try grouping those 2 Container block elements together in a single group block to see if the theme's margin is still applied. I'd try that first - it's worth a shot before trying to write custom CSS overrides.

#1388283

The grouping appears to work ... though not a great long term solution. I will troubleshoot with Generatepress. Thank you for looking into the theme to identify the issue. Much appreciated! The Toolset team goes way above and beyond!

#1388287

Great, feel free to reopen if I've overlooked some Toolset responsibility for this code.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.