- This topic has 4 replies, 2 voices, and was last updated 2 years, 11 months ago by
David.
-
AuthorPosts
-
February 14, 2020 at 3:44 am #1165012
ellaj
Hey guys, I cannot seem to remove top and bottom spacing when I am adjusting the layout spacing settings.
I am using Toolset as my “Page Builder” and have Sections turned off.
I have tested with Toolset installed and not installed, and only tested on a fresh install with just GP 2.4.1, no other plugins other than Premium 1.9.1.
I am running across this issue on multiple sites in development and am wondering how to resolve. Don’t know if it’s because of the GP theme or the Gutenberg editor. Please see video – https://www.loom.com/share/264569af3f714f47a2ee18829195d373
The examples in the video are locally developed but in the Website URL field I have provided a link to a live site. Would love your help in troubleshooting. Thanks in advance!
February 14, 2020 at 6:15 am #1165138David
StaffCustomer SupportHi there,
GP applies this standard Block CSS:
.entry-content>[class*="wp-block-"]:not(:last-child) { margin-bottom: 1.5em; }
This ensures there is a space between elements by adding bottom margin to them. Without it images and other mixed content in a post would collide with each other.
This can be changed with CSS and my preferred method is this:
1. edit the Block, in the Settings > Advanced –> Additional CSS add
strip-margin-bottom
2. Add this CSS to your site:
.entry-content>[class*="wp-block-"].strip-margin-bottom:not(:last-child) { margin-bottom: 0; }
This will remove the gap below any block carrying that class.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 14, 2020 at 8:07 am #1165456ellaj
Thanks David.
That may not be the best term solution as it could impact posts or other pages where I want that padding. I actually found a solution this morning within Toolset. If I nest containers (their blocks) then within Toolset I have full control over the padding and this spacing issue is resolved.
Appreciate the quick reply, and will file it for possible use cases in the future.
Best
February 14, 2020 at 8:08 am #1165458ellaj
Guess I have to write a post mark the issue resolved.
February 14, 2020 at 8:12 am #1165466David
StaffCustomer SupportThat method i provided would only affect those blocks you added the class to – so no issue with it effecting blocks it shouldn’t. But it sounds like you got a better solution – which i am glad to hear 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.