Archived topic
No Space under Image
5 replies · Started by Marius on November 13, 2022
Hello,
on this brand new Site, I have the problem, that there is no space under the images. What can be the issue? I never had this before.
Hi Sonja,
WP used to add margin bottom to image blocks, but they removed it on 6.1.
You can add the margin back using below CSS:
.entry-content figure.wp-block-image {
margin-bottom: 2em;
}
Hi Ying,
thank you, that works.
But does that mean, that all Sites with WP 6.1 will have this problem?
I can hardly imagine that, because then millions of websites would have to have this problem. Or is that really the case?
Also I have updated other Sites with 6.1 but did not have this problem.
Hi Sonja,
Yes, it's a change made by WordPress in the recent update. All images should have the same issue unless their spacing is added through a different way method.
I believe WordPress is trying to streamline styling, including margins, which is why they removed it. See: https://wordpress.org/support/wordpress-version/version-6-1/#a-streamlined-style-system
Yes, it seems to be the case. We've had multiple tickets regarding this issue since the update, and since it's a WordPress Block, what we advise is to re-add the spacing through custom CSS.
Sidenote: GenerateBlocks also has an Image Block which has spacing controls in its settings: https://docs.generateblocks.com/article/image-overview/
This can be an alternative to the WordPress Image Block.
Hello Fernando,
thank you for this Information.
You're welcome Sonja!