Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Good morning,
I am trying to reduce spacing between the grid on my collection page. I am using the Flow theme. As you can see on this page there is too much whitespace between rows, and the first row has a larger gap than the subsequent ones. There is an egregious amount of space on mobile as seen in the image linked. I've tried whitespace controls (adding a hyphen) but can't seem to place them in the right spot and I don't know which element to change the padding on in the theme file.
Thanks in advance.
Solved! Go to the solution
This is an accepted solution.
Hi @Artphere, try this (you may need to replace the previous code) :
.grid__item {
margin: 0;
}
.collection-main-body .collection-main-body-inner div {
margin-bottom: 0;
}
Hello There,
1. In your Shopify Admin go to online store > themes > actions > edit code
2. Find Asset >timber.scss.css and paste this at the bottom of the file:
img.lazyautosizes.lazyloaded {
top: 45%!important;
}
@media only screen and (max-width: 768px){
.grid__item {
margin-top: 0px!important;
}
}
Thank you for your reply. I've added the code, however the grid remains filled with unnecessary whitespace.
This is an accepted solution.
Hi @Artphere, try this (you may need to replace the previous code) :
.grid__item {
margin: 0;
}
.collection-main-body .collection-main-body-inner div {
margin-bottom: 0;
}
Thank you, that's improved things substantially. I'll look at refining the spacing further but it's great for now!
what is the file title?
In Canada, payment processors, like those that provide payment processing services t...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025