Shopify themes, liquid, logos, and UX
Hi there,
My slideshow image for desktop view is perfect size however, when on mobile, the image fills the screen. How can I fix it so that the image for desktop stays the same, however on mobile, the image fits the full screen.
See below: The image for mobile version cuts off. How can I fix it so the photo is shown full screen even if it means the image will appear smaller.
My store URL is https://www.nextlevelsupps.com.au/
Thanks in advance!
Hi @jakelemon
I did a quick CSS turn around to do this.
Copy and paste the below code in theme.liquid template in <head> part
<style>
@media screen and (max-width: 768px){
#Hero-slideshow.hero .hero__image {
object-fit: contain;
font-family: "object-fit: contain";
}
#Hero-slideshow.hero .slick-list {
height: auto !important;
}
#Hero-slideshow.hero[data-adapt="false"] {
height: auto;
}
}
</style>
Hi @jakelemon
In your case the Slider wrapper id is 'HeroWrapper-1638168109e8c700a7' so replace '#Hero-slideshow' to '#HeroWrapper-1638168109e8c700a7'.
@Sheesh_b Hi there, thanks for replying back. I tried putting the code in and it isn't working. I put the code on the line right under <head> on line 3 of theme.liquid file, is this the correct place to put it?
@Sheesh_b As the mobile site loads, the photo is full size however does not stay that way and goes back to the image being too big for the mobile site.
Hi @jakelemon
Kindly replace the previous code with below one
<style>
@media screen and (max-width: 768px){
.index-slideshow-section .hero .hero__image {
object-fit: contain;
font-family: "object-fit: contain";
}
.index-slideshow-section .hero .slick-list {
height: auto !important;
}
.index-slideshow-section .hero[data-adapt="false"] {
height: auto;
}
}
</style>
It will work as I tested it on front-end.
Hi @Sheesh_b
Our store is having the same issues - I tried to insert the code above but having issues with no changes. Below is our current mobile layout but we want the slideshow to fit the full mobile length. Thanks!
Hi @LJD
Let me check this and I'll try to solve this.
Can you check if there is any option to keep the aspect ration of the image in mobile to as of first image?
Thanks
Sheesh B
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025