I’m trying to achieve this on Shopify’s Dwell theme and I cannot make it happen. I’ve tried different code snippets shared in posts. Could anybody help? I wish to align collection grids to center of page when there are less products than columns set.
Horizon family themes use display: grid; for product grids and auto-fill to set number of products per row depending on selected product card size.
One option is to switch from auto-fill to auto-fit but this will make cards grow too big.
Another option is to switch from grid to flex, but it looks complex’ish and would change the product grid behaviour significantly.
Unfortunately, product grid section do not allow adding “Custom Liquid” blocks, but we need to know the card size from section settings and number of products to display.
if my post is helpful, please like it ♡ and mark as a solution -- this will help others find it