Archived topic
Align "overlapping" images in gallery
1 reply · Started by Reto on September 24, 2020
Hi all
I have a gallery with six columns if logos. But if there are less than 6 images for the last row (e. g. 28 logos in total), there will be less columns in the last row. The images are centered instead of left aligned. Is there a way to fill the columns from left to right even if there are less than 6 images for the last row?
Thank's for your support.
Reto
Hi there,
the WP gallery block forces all gallery items to fill the space available, which is why the end row with less 'center' aligns them.
Try adding this CSS to stop that from happening:
.wp-block-gallery li.blocks-gallery-item {
flex-grow: 0;
}