Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi there,
Could you help me set up separate images for mobile and desktop?
I am using Dawn theme.
Thank you
Solved! Go to the solution
This is an accepted solution.
Hi @KMichael,
Go to Assets > base.css and paste this at the bottom of the file:
.banner .banner__media:first-child {
width: 100%;
}
.banner .banner__media+.banner__media {
display: none;
}
@media screen and (max-width: 749px) {
.banner .banner__media:first-child {
display: none;
}
.banner .banner__media+.banner__media {
width: 100%;
display: block !important;
}
}
it will help you to display 2nd image for mobile.
This is an accepted solution.
Hi @KMichael,
Go to Assets > base.css and paste this at the bottom of the file:
.banner .banner__media:first-child {
width: 100%;
}
.banner .banner__media+.banner__media {
display: none;
}
@media screen and (max-width: 749px) {
.banner .banner__media:first-child {
display: none;
}
.banner .banner__media+.banner__media {
width: 100%;
display: block !important;
}
}
it will help you to display 2nd image for mobile.
Is there any way to get the container and then text below the image rather than above? I did your CSS fix, but now the image is below the text which doesn't look very good.
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025