Removing space around blocks (Block Editor)
-
Dear all,
I’m still a bit new to editing WordPress and that means I’m also learning the “new” method of using Block Themes. However, when I search for information using Google, I keep coming to pre-WordPress 5.9 pages, which I think are confusing me.
What I would like to do is remove the white space between blocks for the “Twenty Twenty-Three” theme. For example, in the page I need help with, I’ve created a menu with a red background in the header and two test blocks with an orange and purple background. I’d like to remove all of the vertical white space between these blocks.
I’ve come across instructions here and here which suggests I should:
- Highlight the block I want to edit.
- Select “Block” on the right and then “Advanced”.
- Give a new name for “Additional CSS Classes” like remove-top-bottom-space.
And then add code like this:
.remove-top-bottom-space { margin-bottom: 0; martin-top: 0; }
However, the first page suggests I go to “Appearance -> Customize”. But since it is for the “Twenty Twenty” theme, I think it isn’t relevant to me. At least, “Customize” doesn’t appear when I click on “Appearance”.
The second page is from April 2022, but it also gives the same advice in terms of where to put the CSS code. So, either I can’t see the “Customize” option or maybe its information is no longer valid for the latest version of WordPress (6.1.1).
I think what I need to do is add the above CSS somewhere, but I don’t know what’s the safe way to do it. Perhaps “Tools -> Theme file editor”? But from there, it looks like I have many ways of breaking the theme. So…I thought I should ask.
Am I on the right track? Can someone advise me which CSS I should edit and with what method?
Thank you!
Ray
The page I need help with: [log in to see the link]
- The topic ‘Removing space around blocks (Block Editor)’ is closed to new replies.