Site logo

Archived topic

Make galleries mobile responsive

3 replies · Started by Erin on July 14, 2021

Viewing posts 1–4 of 4

Is it possible to make image galleries mobile responsive on all my blog posts?
On many posts I have galleries with two vertical images side by side and I love that look on desktop but I'd like for them to stack vertically on mobile, is that possible?

Hi Erin,

The gallery block is a WordPress core block so GP can't control the style/layout.

You could give this CSS a shot:

@media (max-width: 768px) {
    .blocks-gallery-grid .blocks-gallery-image, .blocks-gallery-grid .blocks-gallery-item, .wp-block-gallery .blocks-gallery-image, .wp-block-gallery .blocks-gallery-item {
        width: 100%;
    }
}

Thanks for helping even though it wasn't a GP fix!!! Ya'll really are the best, that worked!

Glad to hear :)

This archived topic is closed to new replies.