Archived topic
Why there is no bottom margin on post images and how I add it?
9 replies · Started by Pintu on December 5, 2022
Hi there, my post images have no bottom margin and the images are very close to the underneath paragraph.
See here https://ibb.co/C1hn4mw
So, how can I add some spacing under every post image, and why was there no bottom spacing for the images in the first place?
I've added my site link in the private section, please help.
Hi Pintu,
It's a WP 6.1 issue. See David's response here: https://generatepress.com/forums/topic/no-spacing-beneath-images-in-a-post/#post-2417991
Can you try adding the code provided by David the through Appearance > Customize > Additional CSS and let us know how it goes?
Hi Fernando,
The CSS worked only for the images that Align is set to "None" and those images are "Align center" not worked with that CSS.
You can see what I'm talking about by seeing the images of the page I've added in the private section. On this page the first image align is set to none and other images are aligned center.
Could you please give a fix for this problem.
I see. Can you try this instead?:
.wp-block-image figure, figure {
margin-bottom: 1.5em;
}
Now the images that Align is set to “None” is not working.
I see. I updated the code here: https://generatepress.com/forums/topic/why-there-is-no-bottom-margin-on-images-and-how-i-add-it/#post-2451107
Can you try that instead?
Hi, your updated code worked. Also, I've tried this code
.wp-block-image {
margin-bottom: 1.5em;
}
And it worked too.
So, which CSS do you recommend?
Good catch - if your code works, that would be better. It's shorter and accounts for less redundancy. So, I would recommend that.
Thanks, Fernando marking this as resolved :)
You're welcome, Pintu! :)