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.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By 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, 2024