Hello!
I want to make my product images rounded only in the product page, nowhere else (desktop versions only).
How can I do this?
My theme is Stiletto and my website is www.truepodium.com
Thanks in advance!
A Shopify store owner using the Stilleto theme wants to add rounded corners to product images, but only on product pages and only on desktop devices.
Initial Solutions Provided:
.template-product img with border-radius values (20px or 50%)Desktop-Only Requirement:
After the initial solution worked, the user requested desktop-only implementation to avoid issues on mobile.
Final Solutions:
@media (min-width: 768px) or @media screen and (min-width: 750px)Status: Resolved with desktop-specific CSS implementation.
Hello!
I want to make my product images rounded only in the product page, nowhere else (desktop versions only).
How can I do this?
My theme is Stiletto and my website is www.truepodium.com
Thanks in advance!
@martujv what is the password to view page?
y22
@martujv - how much rounded images do you want? corner only of image as a circle?
Corner only
@martujv - please add this css to the very end of your theme.css file and check, adjust the number as per the need
Shopify Admin → Online Store ->Theme → Edit code → theme.css
.template-product img{border-radius: 20px;}
Hello,
img.image__img {
border-radius: 50%;
overflow: hidden;
}
Thanks!
It worked! Thank you! You are the best
@martujv - thank you very much
Just one last question, is there any way to make this work on desktop versions only? On mobile it looks a bit strange
Hi, is there any way to apply this only on desktop versions and not on mobile versions?
Hello?
Use this code @martujv
@media (min-width: 768px){
img.image__img {
border-radius: 20% !important;
overflow: hidden;
}
}
@martujv sorry for the late reply, only for desktop
@media screen and (min-width:750px){
.template-product img{border-radius: 20px;}
}