We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Remove padding only in certain sections

Solved

Remove padding only in certain sections

Streccent
Excursionist
18 0 3

Hi,

 

I have found the following code to remove the padding on the left side. But I only want this padding to be removed on the main product page template section. Currently it is being removed on every section of the site.

 

<style>
.container {
margin-left: 0 !important;
}
</style>

 

Link: https://arterclo.com/

Pass: yaifra

Accepted Solution (1)

Mehran_Ali
Shopify Partner
462 63 70

This is an accepted solution.

Hi @Streccent 

If you want to remove padding from the main collection page where the product grid disp[lay use this CSS

.shopify-section--main-collection .container {
    margin-left: 0 !important;
}

 

Or If you want to remove the Padding from only the product detail page you can use this CSS

.shopify-section--main-product .container {
    margin-left: 0 !important;
}

 

I hope this helps you if you want to remove it from any other page kindly mention the page link here

If This Solution Word Kindly Like this And Mark it as a Solution or Buy Me a Coffee

-If this solution helps you, kindly LIKE THIS REPLY and MARK AS A SOLUTION OR

Buying Me A Coffee.

-If you need an expert Shopify developer for customization and development, feel free to contact me.


Email: Mehran.ali5300@gmail.com


WhatsApp: +92 343 0211536

View solution in original post

Replies 3 (3)

Mehran_Ali
Shopify Partner
462 63 70

This is an accepted solution.

Hi @Streccent 

If you want to remove padding from the main collection page where the product grid disp[lay use this CSS

.shopify-section--main-collection .container {
    margin-left: 0 !important;
}

 

Or If you want to remove the Padding from only the product detail page you can use this CSS

.shopify-section--main-product .container {
    margin-left: 0 !important;
}

 

I hope this helps you if you want to remove it from any other page kindly mention the page link here

If This Solution Word Kindly Like this And Mark it as a Solution or Buy Me a Coffee

-If this solution helps you, kindly LIKE THIS REPLY and MARK AS A SOLUTION OR

Buying Me A Coffee.

-If you need an expert Shopify developer for customization and development, feel free to contact me.


Email: Mehran.ali5300@gmail.com


WhatsApp: +92 343 0211536

Streccent
Excursionist
18 0 3

Thanks! Exactly what I needed.

Asad-Mahmood
Shopify Partner
452 80 92

Hi 
you should use this code instead

{% if request.path contains 'products' %}
<style>
.container {
margin-left: 0 !important;
}
</style>
{% endif %}




If my solution has been helpful, you can consider supporting me via Buy Me a Coffee.
Hire me: asadmahmood8470@gmail.com
WhatsApp
Fiver