What's your biggest current challenge? Have your say in Community Polls along the right column.

How to remove the white gap padding between the collections in the collection list

Solved

How to remove the white gap padding between the collections in the collection list

moodyc
Shopify Partner
16 0 5

Hello everyone, I'm using the Studio Theme. 

I would like to remove the gap between the collections in my homepage collection list. I've successfully removed the side, top, and bottom padding, but haven't figured out a way to remove the middle one. 

My site is Street Smarts and the password is smarts. Here's the screenshot of the collection list. 

HOW TO DELETE THIS PADDING GAP IN COLLECTION LIST, STUDIO THEME VERSION 8.0.0.jpg

I placed the code at the bottom of my theme.liquid file. Here's the code I used to remove the side padding: 

<style data-shopify="">
.section-template--17894506529061__44d5075b-dd08-44a9-b967-0927b8808030-padding {
padding-right: 0;
padding-left: 0;
}

@media screen and (min-width: 750px) {
.section-template--17894506529061__44d5075b-dd08-44a9-b967-0927b8808030-padding {
padding-right: 0;
padding-left: 0;
}

</style>

THANK YOU.

Accepted Solutions (3)
PageFly-Richard
Shopify Partner
4808 1088 1758

This is an accepted solution.

Hi @moodyc ,

 

This is Richard from PageFly - Landing page builder, I’d like to suggest this idea:
Step 1: Go to Online Store->Theme->Edit code
Step 2: Asset->/section-collection-list.css->paste below code at the bottom of the file:

.collection-list .collection-list__item {
    width: 50% !important;
    max-width: 50% !important;
}

I hope it would help you
Best regards,

Richard | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 


All features are available from Free plan. Live Chat Support is available 24/7.

View solution in original post

mics
Trailblazer
172 12 34

This is an accepted solution.

The issue with this code is that it uses !important to override the default styling of the .collection-list__item element, which can lead to unexpected behavior or difficulties in further modifying the element's styling. Additionally, setting the width and max-width of each item to 50% means that only two items will appear per row, which may not be the desired layout for all screen sizes. It's generally best to avoid using !important unless absolutely necessary and to use responsive design techniques to ensure the layout works well on all devices.
insted use this .grid-uniform .grid__item { padding: 0; }

This should remove the padding between collections in your homepage collection list.

 
 
banned

View solution in original post

PageFly-Richard
Shopify Partner
4808 1088 1758

This is an accepted solution.

Hi @moodyc ,

 

I’m sorry to hear that. Please give it a try with this new solution:

You can replace previous my code by below code in section-collection-list.css file:

@media screen and (min-width: 768px) {
    .collection-list .collection-list__item {
        width: 50% !important;
        max-width: 50% !important;
    }
}
@media screen and (max-width: 767px) {
    .collection-list {
        padding: 0 !important;
    }
}

I hope it would help you
Best regards,

Richard | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 


All features are available from Free plan. Live Chat Support is available 24/7.

View solution in original post

Replies 11 (11)

moodyc
Shopify Partner
16 0 5

@KetanKumar @suyash1 @oscprofessional please help if you have time

 

KetanKumar
Shopify Partner
37445 3664 12119

@moodyc 

yes, please try this 
1. Go to Online Store->Theme->Edit code
2. Asset->/base.css ->paste below code at the bottom of the file.

.collection-list {
    row-gap: 0px !important;
    column-gap: 0px !important;
    justify-content: center;
}

 

If helpful then please Like and Accept Solution. Partnership of your ️ Coffee Tips and my code can bring miracles.
Want to modify or custom changes on store Hire Me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
moodyc
Shopify Partner
16 0 5

THANK YOU! It worked for the gap in the middle but the padding transferred to the sides 😂 How do i remove this please? 🙂 

Screen Shot 2023-02-17 at 8.20.45 PM.png

oscprofessional
Shopify Partner
16116 2410 3126

@moodyc 

.collection-list-wrapper.page-width.isolate.no-heading.no-mobile-link.section-template--17894506529061__44d5075b-dd08-44a9-b967-0927b8808030-padding {
    max-width: initial;
}
Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing | Oscp Upsell & Cross sell App : Free | Oscp Sales & Volume Discount App : Free | Custom Pricing Wholesale App : Free
oscprofessional
Shopify Partner
16116 2410 3126

@moodyc 

also add this css.

.marquee-container {
    max-width: initial;
}
Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing | Oscp Upsell & Cross sell App : Free | Oscp Sales & Volume Discount App : Free | Custom Pricing Wholesale App : Free
moodyc
Shopify Partner
16 0 5

The marquee container worked, thank you! 

However, the collection-list-wrapper didn't. I already placed a code that removed the gap between the collections but moved the padding to the side of the collections. Maybe this will help: 
.collection-list {
row-gap: 0px !important;
column-gap: 0px !important;
justify-content: center;
}

thank you

PageFly-Richard
Shopify Partner
4808 1088 1758

This is an accepted solution.

Hi @moodyc ,

 

This is Richard from PageFly - Landing page builder, I’d like to suggest this idea:
Step 1: Go to Online Store->Theme->Edit code
Step 2: Asset->/section-collection-list.css->paste below code at the bottom of the file:

.collection-list .collection-list__item {
    width: 50% !important;
    max-width: 50% !important;
}

I hope it would help you
Best regards,

Richard | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 


All features are available from Free plan. Live Chat Support is available 24/7.

mics
Trailblazer
172 12 34

This is an accepted solution.

The issue with this code is that it uses !important to override the default styling of the .collection-list__item element, which can lead to unexpected behavior or difficulties in further modifying the element's styling. Additionally, setting the width and max-width of each item to 50% means that only two items will appear per row, which may not be the desired layout for all screen sizes. It's generally best to avoid using !important unless absolutely necessary and to use responsive design techniques to ensure the layout works well on all devices.
insted use this .grid-uniform .grid__item { padding: 0; }

This should remove the padding between collections in your homepage collection list.

 
 
banned
moodyc
Shopify Partner
16 0 5

can i have the code so that it won't affect the mobile layout please? thank you! 

 

PageFly-Richard
Shopify Partner
4808 1088 1758

This is an accepted solution.

Hi @moodyc ,

 

I’m sorry to hear that. Please give it a try with this new solution:

You can replace previous my code by below code in section-collection-list.css file:

@media screen and (min-width: 768px) {
    .collection-list .collection-list__item {
        width: 50% !important;
        max-width: 50% !important;
    }
}
@media screen and (max-width: 767px) {
    .collection-list {
        padding: 0 !important;
    }
}

I hope it would help you
Best regards,

Richard | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 


All features are available from Free plan. Live Chat Support is available 24/7.

falcon
New Member
10 0 0

Hey! I've been trying to reduce the top and bottom padding of the collection list. Please go to https://nuclieus.com/ see the collection list right after the hero image. It's 2 collections, but I want to reduce the top padding. I need the collectio list to show up higher (for less scroll on mobile devices). Please help, thanks!