Site logo

Archived topic

Minimize vertical space between "all" galleries on my page

9 replies · Started by Jenny on September 2, 2022

Viewing posts 1–10 of 10

Hello :)

do you know a way to minimize the "vertical" Space in the Galeries (I used an duplicate-Element :)) on my page?
Can you help me?

https://ibb.co/bgdVxbk

Thank you 🌻,
Jenny

Hi there,

try adding this CSS:

.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img {
    margin-bottom: 0;
}

Thank you David, that worked great ❤️. I have got an second issue, also with the galery. Maybe you also know here an answer? https://ibb.co/VpMnBSY

I have this gallery on
DE, RU, EN, but just on the "home"

Thank you so much :).

Add this CSS:

.wp-block-gallery.no-gap {
    grid-gap: 0;
}

then select the Gallery Block(s) you want to remove the gap and in Advanced > Additional CSS Class(es) add: no-gap

Thank you David 🌻. It worked perfect.

Glad to hear that :)

Dear David,

I have to ask again, because I just checked the Desktop view.
On mobile fews I need the space like bevor. Is there an solution for it?
This just regards "no gaps" class

Thanks for looking It up once again :)
Jenny

Hi Jenny,

To clarify, you just want no gap on Desktop, and the default on other views?

If so try modifying the CSS to this:

@media (min-width: 1025px) {
    .wp-block-gallery.no-gap {
        grid-gap: 0;
    }
}

perfect :) Thank you Fernando 🌻

You're welcome Jenny! :)

This archived topic is closed to new replies.