Shopify themes, liquid, logos, and UX
On the mobile view of my home page, there is vertical white padding space after each banner image. I've tried resizing images and removing buttons, both of which have reduced the padding space, but I'd like to completely remove it. I've tried many different codes, none of which have worked. The desktop version is completely fine. There is no padding space, but my mobile view of the home page is not good.
provide url of your store and also share password if it is protected.
go base.css
and find
img.hide.mobile-only
line no is 3655.
add
object-fit: cover !important;
so it looks like
Try adding this CSS in the Custom CSS area for that section:
@media (max-width: 767px) {
.banner--mobile-bottom .banner__media {
aspect-ratio: 3 / 4;
}
}
Hi @Akosua
PLease, share your store URL. Thanks!
@Akosua
In your Shopify dashbord > Go to online store > In your theme > Click edit code > Find base.css file
and put this code in the last base.css file and save changes.
@media only screen and (max-width: 768px) {
.slideshow__media.banner__media.media,
img.hide.mobile-only {
padding: 0 !important;
margin: 0 !important;
object-fit: cover !important;
width: 100% !important;
height: auto !important;
display: block !important;
}
}
Thanks!
Hi there,
This removed the padding space but cut off the images in terms of width. I've updated my store again. It's not the slideshow that I'm trying to fix. It's just the mobile banner image on the home page.
Thank you!
Hi @Akosua
You can try to follow this step
Step 1: Go to Edit code
Step 2: Find file base.css and add this code at the end of the file
@media (max-width: 767px) {
.slideshow__media.banner__media.media {
padding: 38% 0 !important;
}
}
Result
Best,
DaisyVo
Thank you, everyone!
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn 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, 2025