Archived topic
Decrease White Space Under Line of Text in Block Editor
4 replies · Started by Trish on October 12, 2022
Lost again...
I have a line of text that appears above my autoresponder's form that is forcing a large white space between the text and the form.
See screen print here: https://www.awesomescreenshot.com/image/33353562?key=6a72295f34a2618f0624153df460e72c
How can I reduce that space so that the text sits flush on the bottom of the block?
Have tried so many different things... but... once again, this new block editor is complicating issues.
Thank you in advance,
Trish
Hi Trish,
To clarify, does this line of text appear only in this page, and would you like to remove this space only for this page if so?
If it's just for this page, try adding this in Appearance > Customize > Additional CSS:
.home .entry-content .wp-container-10.wp-block-column > p {
margin-bottom: 0;
}
The text is built with a WordPress Paragraph Block which has a default bottom margin, thus, the need for custom code.
You are a gem Fernando... it WORKED perfectly!
Thank YOU!!!!!!!!!!!!!
You're welcome Trish!
Alternatively, a more ideal approach for reusability is to add class remove-margin-bottom to the Paragraph Block, then add this CSS instead:
.remove-margin-bottom {
margin-bottom: 0 !important;
}
In this way, if you need to remove the bottom margin of any Paragraph Block, you just give it a class remove-margin-bottom
Relevant article: https://wordpress.com/support/wordpress-editor/adding-additional-css-classes-to-blocks/
That was one of the FIRST options I tried and it failed to work for me.
Your previous script worked PERFECTLY!