Spacing between images | WordPress.org

Hey,

A while ago I noticed that when I add a regular image after a gallery block, the spacing between them disappears.

Here’s a screenshot: https://imgur.com/a/uf2kRTB

If I add an image first, followed by a gallery block, the spacing looks fine, so I assume the problem is only with bottom padding.

I tried to add a custom CSS code:

.gallery-item, img { padding-bottom: 10px; }

However, it appears I can only apply it both to gallery items and regular images. If I remove the “img” part, the code stops working.

As a result, the spacings between images are uneven because it adds another padding to regular images. See a screenshot:

https://imgur.com/a/LzIwLYv

The top and bottom spacing are uneven. As I’m no expert when it comes to CSS, can anyone help me tweak the code to fix this issue?

Thanks in advance!

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer