Home>Support>How do I center images in a WP gallery?

How do I center images in a WP gallery?

I’ve created a grid gallery of logos of our partners, but all of the images are aligning with the top of the row they are in. I’d like them centered vertically and horizontally in each cell but have no idea how to go about this. Would also like to increase the padding in each cell.

thanks-

Mark

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 7 years, 5 months ago Alex S
    Hi, I Work Here

    Hi mark,

    Do you have a public URL where we can take a look at your setup?

  2. 7 years, 5 months ago spentcartridge

    Yes, see if this shows you what you’re looking for:

    Thanks Alex-

  3. 7 years, 5 months ago spentcartridge

    ok the link didn’t post in the last message for some reason. Posting as text only here:

    http://test-scbi.pantheonsite.io/partners/

  4. 7 years, 5 months ago Alex S
    Hi, I Work Here

    Hi Mark,

    Thanks. Okay so based on your structure, I would recommend using SiteOrigin Page Builder and waiting for the next Page Builder Update. This update, which currently has an ETA of Wednesday, will include functionality that will allow you to easily vertically alignment widgets within the specific row and thus easily do this without using CSS.

    Regardless of whether you wish to wait or not, you’ll need to split the gallery up into multiple rows/galleries as vertical alignment doesn’t play well with multi-row setups. I know it’s a pain but it’s sadly unavoidable.

    If you would like to do this before the update, please add the following CSS to WP AdminAppearanceCustom CSS:

    @media (min-width: 780px) {
    	.page-id-37 .gallery {
    		display: flex;
    		justify-content: center;
    		align-items: center;
    	}
    }
    

    Please note that this CSS will not look good until you’ve restructured the images into multiple galleries.
    You might also need to install the SiteOrigin CSS Editor.

  5. 7 years, 5 months ago spentcartridge

    Haven’t used PageBuilder before so I have one question: To insert an image in a row, do I have to insert the image widget? Or is there a way to add an image without using the widget?

  6. 7 years, 5 months ago Alex S
    Hi, I Work Here

    Hi Spentcartridge,

    Please note that the update I was talking about in my last post has been released.

    SiteOrigin Page Builder works on a widget system. If you want to do X, you’ll need a widget that X. Y? Need a widget that does Y. Does that make sense?

    With that said, you can do this with the SiteOrigin Editor widget or the SiteOrgin Image widget. The latter being more recommended for this and both are included in the SiteOrigin Widgets Bundle.

    I would recommend giving the getting started guide a read through.

  7. 7 years, 5 months ago spentcartridge

    Yes, I updated yesterday, but I don’t see how to center an image vertically. Where is that functionality found?

  8. 7 years, 5 months ago Alex S
    Hi, I Work Here

    Hi Spentcartridge,

    Please open the row housing the images by clicking the wrench icon above the row. head over to the row styles sidebar and open the Layout settings group. Set the Cell Vertical Alignment (it’s the last setting in the layout settings group) to top.

    Please ensure that each image is added to a dedicated Image widget in its own column. The ideal setup being:

  9. 7 years, 5 months ago spentcartridge

    That did it. Thanks for your help Alex-

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More