[Resolved] How to modify vertical and horizontal spacing between gallery items

Home Forums Support [Resolved] How to modify vertical and horizontal spacing between gallery items

Home Forums Support How to modify vertical and horizontal spacing between gallery items

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1524852
    Alexandra

    Hey guys,

    I was wondering whether you could help me modify the spacing between gallery items.
    These are the spaces that I need to change to 1 px:
    https://prnt.sc/vgk3bi

    Sample post

    I would highly appreciate your help, as always!
    Thank you so much!
    Alexandra

    #1525012
    David
    Staff
    Customer Support

    Hi there,

    try adding this CSS:

    @media (min-width: 600px) {
        .wp-block-gallery.columns-4 .blocks-gallery-item {
            width: calc(25% - 1px);
            margin-right: 1px;    
        }  
    }
    .wp-block-gallery.columns-4 .blocks-gallery-item {
        margin-bottom: 1px;
    }
    .wp-block-gallery.columns-4 .blocks-gallery-item figure {
        margin-bottom: 0;
    }
    #1525140
    Alexandra

    This is a dream come true!! 😀
    So happy!
    I can’t thank you enough!

    #1525148
    David
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.