Shopify themes, liquid, logos, and UX
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
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
Solved! Go to the solution
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
-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
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
-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
Thanks! Exactly what I needed.
Hi
you should use this code instead
{% if request.path contains 'products' %}
<style>
.container {
margin-left: 0 !important;
}
</style>
{% endif %}