All things Shopify and commerce
Mobile image banners don't scale properly in Dawn. I used separate image banners for mobile with the recommended 800x800.
I used a code in base.css:
@media screen and (max-width: 749px) {
.banner__media { height: auto !important; }
.banner__media img { object-fit: contain !important; position: relative !important; }
}
And it resolved an issue on the mobile view from shopify store:
But when opening the store on my phone it looks **bleep**ty:
I tried different ratios to do it without a code, but in that case on some mobile phones it looked perfectly, but on different didn't and every picture was scalling differently.
The best scenario is to force shopify to show the original aspect ratio on every mobile for every image, as I am trying to add multiple image banners one after another to create one long picture.
Store link: https://fbbf11-37.myshopify.com/
Solved! Go to the solution
This is an accepted solution.
@media screen and (max-width: 370px) {
.banner--medium.banner--mobile-bottom:not(.banner--adapt) .banner__media{
height: 30rem !important;
}
}
@media screen and (min-width: 400px) and (max-width: 749px) {
.banner--medium.banner--mobile-bottom:not(.banner--adapt) .banner__media{
height: 36rem !important;
}
}
@Ontarni you can try it
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)
Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page
- Here is the solution for you
- Please follow these steps:
- Then find the base.css file.
- Then add the following code at the end of the file and press 'Save' to save it.
@media screen and (max-width: 370px) {
.banner--medium.banner--mobile-bottom:not(.banner--adapt) .banner__media{
height: 30rem !important;
}
}
- Here is the result you will achieve:
- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)
Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page
Thank you!
It works on two mobile phones that I checked, but on the third one (iphone 14) it looks like this whenever photos from image banners meet:
What might be the issue?
This is an accepted solution.
@media screen and (max-width: 370px) {
.banner--medium.banner--mobile-bottom:not(.banner--adapt) .banner__media{
height: 30rem !important;
}
}
@media screen and (min-width: 400px) and (max-width: 749px) {
.banner--medium.banner--mobile-bottom:not(.banner--adapt) .banner__media{
height: 36rem !important;
}
}
@Ontarni you can try it
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)
Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025