All things Shopify and commerce
Hi, I need help regarding image size on my store. Can someone help me to code to make my images fit on both desktop and mobile phone pls?
Hi @nhabd12
It can be but will not display in excellent size, so I recommend you create 2 image banner sections, one for desktop and one for mobile.
In mobile section, add this code to Custom CSS to hide it on the desktop
@media (min-width: 768px) {
.banner { display: none; }
}
And add this code in Custom CSS of desktop image banner section to hide it on mobile
@media (max-width: 767px) {
.banner { display: none; }
}
I hope this helps.
Best regards,
Dan from Ryviu
- Solved it? Hit Like and Accept solution! ❤️Buy Me Coffee❤️
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
This solution is what we use only when we want completely different images. Normally we try and set focal points that work well across both desktop and mobile so it naturally crops where we need it. We design banners around this functionality.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024