Reducing Spacing Between Collection Grid Rows

Solved

Reducing Spacing Between Collection Grid Rows

Artphere
New Member
5 0 0

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.

Screenshot_20210510-075106_Chrome.jpg

Accepted Solution (1)
g33kgirl
Shopify Partner
390 109 145

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;
}

 

If you found my answer helpful, please LIKE and ACCEPT.
buymeacoffee.com/g33kgirl
If you're not comfortable with code, please modify code files at your own risk.

View solution in original post

Replies 5 (5)

ZestardTech
Shopify Partner
6096 1091 1464

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;
}
}
Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: support@zestard.com
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing
Artphere
New Member
5 0 0

Thank you for your reply. I've added the code, however the grid remains filled with unnecessary whitespace. 

g33kgirl
Shopify Partner
390 109 145

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;
}

 

If you found my answer helpful, please LIKE and ACCEPT.
buymeacoffee.com/g33kgirl
If you're not comfortable with code, please modify code files at your own risk.
Artphere
New Member
5 0 0

Thank you, that's improved things substantially. I'll look at refining the spacing further but it's great for now!

Pareshbhimani
Visitor
1 0 0

what is the file title?