• Resolved peterertl

    (@peterertl)


    How to set Gallery Gap (blockspacing) by default to 1 for all used galleries?

    .wp-block-gallery.wp-block-gallery-1 {
    gap: 5px !important;
    }

    I use this add code but it change just first gallery in post in order. I use very often more than one gallery. I want to set 5px or 1 in editor by default for all galleries.

    See link http://pokusna.sk/ucitel/

    • This topic was modified 2 years, 11 months ago by peterertl.

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

Viewing 1 replies (of 1 total)
  • Moderator jordesign

    (@jordesign)

    Hi @peterertl,

    There’s a couple of ways you could approach this. With the CSS you’re using – the .wp-block-gallery-1 part is limiting it to only be the first gallery on the page. To have it apply to all gallery blocks you can use this css code instead.

    figure.wp-block-gallery {
        gap: 5px !important;
    }

    But if I can suggest an even better way – you can use the Gallery Block settings to set the Block Gap directly to that value.

Viewing 1 replies (of 1 total)

The topic ‘gallery gap by default for 1’ is closed to new replies.