MOBILE IMAGE BANNER HOME PAGE PADDING

MOBILE IMAGE BANNER HOME PAGE PADDING

Akosua
Tourist
6 0 1

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.

 

Replies 9 (9)

Jack_Khan_Baba
Shopify Partner
131 9 17

provide url of your store and also share password if it is protected.

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
Chat on WhatsApp: +923143054166
Need a Shopify developer? Hire us at naimatullahts335@gmail.com
- Hire me, if you want to design, re-design, develop a store, or make changes to the pre-built store.
Akosua
Tourist
6 0 1
Jack_Khan_Baba
Shopify Partner
131 9 17

go base.css
and find 

Jack_Khan_Baba_0-1747176902979.png

img.hide.mobile-only 

line no is 3655.
add 
object-fit: cover !important;

so it looks like

Jack_Khan_Baba_1-1747177001858.png

img.hide.mobile-only {
display: block !important;
object-fit: cover !important;
}

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
Chat on WhatsApp: +923143054166
Need a Shopify developer? Hire us at naimatullahts335@gmail.com
- Hire me, if you want to design, re-design, develop a store, or make changes to the pre-built store.
DrewOswald
Shopify Partner
81 18 25

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;
  }
}

DrewOswald_0-1747195786412.png

 

devDrew webDev · Need a developer? Send me a DM.
Follow me on Instagram for Shopify Tips & Tricks: https://www.instagram.com/devdrew.webdev/

Made4uo-Ribe
Shopify Partner
10211 2427 3078

Hi @Akosua 

PLease, share your store URL. Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.

topnewyork
Astronaut
1539 189 250

@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!

 

Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month
Akosua
Tourist
6 0 1

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!

DaisyVo
Shopify Partner
4460 499 596

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 

DaisyVo_0-1747215024636.png

 

Best,

DaisyVo

 

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution
Akosua
Tourist
6 0 1

Thank you, everyone!