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)
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now- 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)
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month nowThank 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)
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month nowBy investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We 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, 2024