Shopify themes, liquid, logos, and UX
Hello,
I want to completely remove the padding around my product images on mobile view. I tried this code from another post but it only removes the padding from the first image. I want to also remove padding from every product image.
Code I used:
@media screen and (max-width: 749px) {
.product .grid--peek.slider .grid__item:first-of-type {
margin: 0;
}
.product .product__media-list .product__media-item {
width: 100%;
}
}
@media screen and (max-width: 749px) {
.product .grid--peek.slider .grid__item:first-of-type {
padding-top: 0;
}
}
1st product image (looks good):
From 2nd image and onwards (white space on left and top of image):
Any help would be appreciated!
Hi @kdop10
The code youve provide is calling only the first image.
Would you mind sharing your store URL? Thanks!
Just clarification, you like to make the image shown fully right? Like this.
If it is check this one.
From you Admin page, go to Online Store > Themes
Select the theme you want to edit
Under the Asset folder, open the section-main-product.css
Then place the code below at the very bottom of the file.
@media only screen and (max-width: 749px){
.product-media-container.constrain-height .media {
padding-top: max(var(--constrained-height), var(--ratio-percent));
}
}
And Save.
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
It didn't work. I tried deleting the code I originally used but that just resulted the 1st page having padding all around.
For reference I'm using dawn 15.1.0
We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024