• In the core gallery block I can no longer adjust the gap between images in this block on any of my sites. In the styles tab under Dimensions there used to be extra settings for adjusting the gap but all I have there is padding and margin. I have disabled plugins and changed the theme from Astra to Twenty Twenty three but this didn’t help. I can add CSS as follows which does work but this is not an ideal situation.

    .page-id-46151 .wp-block-gallery, .blocks-gallery-grid {
    gap: 10px !important;
    }

    Grateful for any advice.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • I don’t know the story behind its removal in the current WordPress version, but the “BLOCK SPACING” feature is in the latest version of the Gutenberg plugin — the bleeding-edge version of the block editor.

    So you can be sure it’ll come back in a future WordPress release.

    Thread Starter Andrzej

    (@ukandrzej)

    Thank you @gappiah.

    So until the gap is reinstated, for anyone needing to adjust the gap between images, my advice is this: With CSS target the post or page ID and add your gap parameters as I did. Otherwise, you will change the gap in gallery blocks site-wide. If there is more than one gallery on a post/page, get the exact CSS per gallery – they should differ. When the gap is reinstated in the styles tab, I imagine you should be able to remove the CSS and use the styles tab instead.

    There are a few YouTube videos out there telling you how to adjust the gap in this block but they relate to slightly older versions of WordPress.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cannot adjust gap in core gallery block’ is closed to new replies.