Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I want to create different mobile banner with square size and keep different desktop banner.
Hello @kumargaurav
This is Amelia at PageFly - Shopify Advanced Page Builder app.
You can try the following steps I have provided to help you solve the problem you are facing:
Step 1: Select two images like as shown below. The first image is for desktop, the second is image for mobile
Step 2: Online Stores > Themes > Edit code
Step 3: Choose file theme.liquid
Step 4: Add code above the tag </head>
<style>
@media only screen and (max-width: 767px) {
.banner .banner__media:first-child {
display: none !important;
}
.banner .banner__media:nth-child(2) {
width: 100% !important;
}
}
@media only screen and (min-width: 768px) {
.banner .banner__media:first-child {
width: 100% !important;
}
.banner .banner__media:nth-child(2) {
display: none !important;
}
}
</style>
Hoping my solution helps you solve your problem.
Best regards,
Amelia | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
➜ Weekly updated Shopify tutorials on YouTube
All features are available from Free plan. Live Chat Support is available 24/7.
This makes me get two half sized banners.. Hmm..
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