• Resolved amaeria

    (@amaeria)


    Hey, I wonder if there is a way to set the size of the last images that appears in the gallery? This in case for example that there is an uneven number of photos and the very last row will only have one photo instead of six and this final photo will then display large size to fill the width of the gallery instead of showing small size as the other photos in the rest of he gallery….
    Any ideas how to change the size of this last photos to fit and have the same size as the rest of the gallery?

Viewing 2 replies - 1 through 2 (of 2 total)
  • primitivenet

    (@primitivenet)

    You can do this by overriding flex-grow to 0 in your CSS.

    .blocks-gallery-grid .blocks-gallery-image, .blocks-gallery-grid .blocks-gallery-item, .wp-block-gallery .blocks-gallery-image, .wp-block-gallery .blocks-gallery-item { flex-grow: 0; }

    Plugin Author Codeer

    (@codeer)

    Thanks you so much @primitivenet for helping out. Yup, adding this custom piece of CSS is the solution I’d have suggested as well.

    The HappyFiles gallery is using the WordPress gallery CSS. This helps avoid adding more unnecessary/duplicate code to your site. So the way the HappyFiles gallery is displayed is identical to WordPress’ gallery.

    @amaeria: I assume you were able to copy & paste the CSS provided above to your site, and that it is working for you. So I am going to close this issue. If you are still experiencing this issue, feel free to reply to this thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘size of last photo in gallery’ is closed to new replies.