- This topic has 2 replies, 2 voices, and was last updated 4 years ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The topic ‘extra space after multi column block’ is closed to new replies.
Hello – I notice that if I add a block section that has two columns in it, I get an extra amount of white space following that block, before the next block.
Create 2 column block. Add asdfaf to first column. Add asdfadfadf to second column.
Create next block as standard paragraph block. Add adfasdfadfadf.
Create next block as standard paragraph block. Add adfasdfadfadf.
You’ll notice that there is more white space between 2 column block and standard paragraph block than there is between the standard paragraph blocks. Any suggestions? thank you
This is by design (both in default WP block styling and the theme’s styling), because the column block is wrapped in a <div></div>
, but the standard paragraphs that are not within another block are only wrapped in the paragraph tags <p></p>
.
You can remove the extra space below the ALL the divs by adding this code to ‘Additional CSS’:
.single-entry-content > div {
margin-bottom: 0;
}
…or to remove the spacing from ONLY the column block div, use this CSS instead:
.single-entry-content > div.wp-block-columns {
margin-bottom: 0;
}
You are amazing. Thank you for your quick response and easy modification. Thank you.