Support » Fixing WordPress » Alignment in image gallery block not working

  • Hi
    I was thrilled to discover the Image Gallery block. Unfortunately, it does not behave as expected for me.

    In the editor the images are neatly aligned :

    https://snag.gy/6X3j04.jpg

    But on the live page images are not aligned nor justified.

    Any help to resolve the issue would be much appreciated.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @yogibeard

    Try this CSS

    @media (min-width: 600px){
    	.wp-block-gallery.columns-3 .blocks-gallery-image, .wp-block-gallery.columns-3 .blocks-gallery-item {
    	    width: calc((100% - 16px * 2)/ 4);
    	}
    }

    Thanks

    Thread Starter YogiBeard

    (@yogibeard)

    Thank you @rajanit2000

    I am not sure about the correct place to put this code. I tried the Customizer additional CSS field and it does work there, but only for the 3 column galleries. For one column (or mobile) and four column galleries, the images are still not justified.

    Should this not work “out of the box? Is it my theme causing conflicts?

    Thread Starter YogiBeard

    (@yogibeard)

    For info :

    I found the global solution to this. I updated my theme to the latest version…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Alignment in image gallery block not working’ is closed to new replies.