Shopify themes, liquid, logos, and UX
The image banner on the mobile looks really good but it is way too big on the desktop. What I want for the desktop image is to look like this---the image with the wide black background. And the current image for the mobile cuz it looks perfect on mobile right now. How do i make this change? My url is www.whoglobal.shop
Hi @samueljoonjung I see it look good
This is Richard from PageFly - Shopify Page Builder App
Please add this code to your theme.liquid above the </head> to get this solved
Step 1: Online Stores > Themes > More Actions > Edit code
Step 2: click on theme.liquid and paste the code above the </head>
<style>
@media (min-width: 768px){
#Banner-template--24070163759400__image_banner_B4a783::before, #Banner-template--24070163759400__image_banner_B4a783 .banner__media::before {
padding-bottom: 50%;
}
.banner__media {
height: 50%;
background:#000;
}
.media>img {
object-fit: contain;
}
}
</style>
Hope this can help you solve the issue
Best regards,
Richard | 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)
All features are available from Free plan. Live Chat Support is available 24/7.
Hi @samueljoonjung ,
You can use the <picture> tag to serve different images based on screen size. This is a clean and efficient way to handle responsive images.
Replace your existing banner image code with the following:
<picture>
<!-- Desktop Image -->
<source srcset="your-desktop-image.jpg" media="(min-width: 769px)">
<!-- Mobile Image -->
<img src="your-mobile-image.jpg" alt="Banner Image" class="responsive-banner">
</picture>
Please be more specific. How do i find the existing banner image code. And what is the banner image code?
To find the banner image code:
Replace the existing banner code (if using an <img> tag):
<picture>
<source srcset="your-desktop-image.jpg" media="(min-width: 769px)">
<img src="your-mobile-image.jpg" alt="Banner Image">
</picture>
If it's a background image, you'll need to update the CSS instead.
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