Re: want to fit banner image on mobile view

Solved

want to fit banner image on mobile view

Advertfox
Shopify Partner
85 0 17

Hi,

 

i have made mobile banner with standard size but it's not fitting properly. however it fits perfectly on desktop view. i tried several codes but unfortunately it's not working.

 

link: https://advertfox.myshopify.com/

pass: advertfox

CaptureA.JPG

Accepted Solution (1)
Dan-From-Ryviu
Shopify Partner
11737 2301 2485

This is an accepted solution.

Please update the code and check again

@media (max-width: 749px) {
    .slideshow__media.banner__media.media.mob { 
        min-height: 479px !important; 
        height: auto !important; 
    }
    .slideshow__slide.grid__item {
        overflow: hidden;
    }
}

- Helpful? Like & Accept solution! - Support me? Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...
Sign up now.

View solution in original post

Replies 10 (10)

LizHoang
Shopify Partner
1251 159 195

Hi @Advertfox 

 

You can follow the instruction here :

1. Go to Shopify > Online store > theme > customize

2. Click to Settings > Custom CSS > Paste this code to the section and save.

 

.banner--adapt, .banner--adapt_image.banner--mobile-bottom .banner__media:not(.placeholder) {
   width: auto!important;
    height: 100%!important;
     max-height: none!important; 
}
}

 

 

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

Check our Joy Rewards & Loyalty Program

DaisyVo
Shopify Partner
4447 495 591

Hi @Advertfox ,

 

You can follow the steps here:

 

Step 1: Shopify admin > Online store > Customize: https://prnt.sc/XQ6IDB99kUCd
Step 2: From the left menu > Theme settings > Open Custom CSS: https://prnt.sc/ypQ7nly2wv27
Step 3: Copy the code below and paste it there

 

Here is the code for step 3:

@media screen and (max-width: 768px){
.slideshow__media.banner__media.media.mob {
    height: 500px;
}
.slideshow__media.banner__media.media.mob img {
    width: 100% !important;
    height: auto !important;
}
}

Here is the result:

DaisyVo_0-1736216815204.png

 

Please let me know if it works!

Best,

Daisy

 

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
Advertfox
Shopify Partner
85 0 17

Hi,

 

thank you for your help, i did it but it shows little gray space after the image

Dan-From-Ryviu
Shopify Partner
11737 2301 2485

Please add more this code to solve the issue with gray space

@media (max-width: 749px) {
    .slideshow__slide.grid__item {
        overflow: hidden;
    }
}

- Helpful? Like & Accept solution! - Support me? Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...
Sign up now.

Advertfox
Shopify Partner
85 0 17

Hi,

 

it's still showing the gray space 

Dan-From-Ryviu
Shopify Partner
11737 2301 2485

Please update the code 

@media (max-width: 749px) {
    .slideshow__media.banner__media.media.mob { min-height: 479px; }
    .slideshow__slide.grid__item {
        overflow: hidden;
    }
}

- Helpful? Like & Accept solution! - Support me? Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...
Sign up now.

Advertfox
Shopify Partner
85 0 17

i added it in custom CSS in theme settings, also tried in my base.css file as well but it didn't worked so i removed it 

Dan-From-Ryviu
Shopify Partner
11737 2301 2485

This is an accepted solution.

Please update the code and check again

@media (max-width: 749px) {
    .slideshow__media.banner__media.media.mob { 
        min-height: 479px !important; 
        height: auto !important; 
    }
    .slideshow__slide.grid__item {
        overflow: hidden;
    }
}

- Helpful? Like & Accept solution! - Support me? Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...
Sign up now.

Advertfox
Shopify Partner
85 0 17

that really worked, thanks a lot Dan 🙂

Advertfox
Shopify Partner
85 0 17

all good now 🙂