Site logo

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

Viewing posts 1–10 of 10

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 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.

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! :)

This archived topic is closed to new replies.