Archived topic
How to create a larger space between Gutenberg Blocks
8 replies · Started by talwhite on December 26, 2022
Hello,
Is there any way to set a default amount of space between Gutenberg blocks?
Thank you,
Tal White
Hi Talwhite,
One way would be to use custom CSS code.
For instance, this CSS code targets the top and bottom margins of all Paragraphs and H1s:
p, h1 {
margin-top: 10px !important;
margin-bottom: 10px !important;
}
Are you wanting to create a default spacing for all elements in a page's content?
Hello Fernando,
Yes, I want to create a default spacing for all elements in a page's or post's content.
Any thoughts are appreciated.
I see.
This CSS code adds top and bottom margins to all nodes/elements inside your post's content:
.single-post .entry-content * {
margin-top: 10px !important;
margin-bottom: 10px !important;
}
Where would I post the CSS code?
In Appearance > Customize > Additional CSS.
Hi Fernando,
Thank you ...
I noticed I already have some info in Appearance > Customize > Additional CSS:
.post-image {
margin-bottom: 0!important;
Should this be deleted? Does it override your code of:
.single-post .entry-content * {
margin-top: 15px !important;
margin-bottom: 15px !important;
}
Thank you for your patience!
Can you link us to the page in question?
Hello,
My goal is to have 15px spacing between any block within any/all WordPress posts or pages.
