Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: How can I resize my homepage image (main) banner for mobile view?

Solved

How can I resize my homepage image (main) banner for mobile view?

Patwalters
Tourist
9 0 2

Hello, I hope everyone is doing well! Currently, I love how the main image banner, on my homepage, looks on the desktop screen, however, on mobile screens it isn't width enough so you can't see the end sides  (right and left) of the image. I'll appreciate any suggestion on how to fix this issue. Thanks in advance! 

 

Url: https://legacymacramestudio.com/

 

WhatsApp Image 2024-08-01 at 13.28.23_ef78964d.jpg

Accepted Solution (1)

Asad-Mahmood
Trailblazer
209 37 42

This is an accepted solution.

Go to your online store -> customize -> settings -> custom css and paste this code there 

@media screen and (max-width: 749px) {
    .banner--medium:not(.banner--mobile-bottom):not(.banner--adapt) .banner__content {
        min-height: 16rem !important;
    }
div.slideshow__media.banner__media.media img {
    height: auto !important;
    object-fit: contain;
}
}

 

AsadMahmood_0-1722535049682.png

 

If my solution has been helpful, you can consider supporting me via Buy Me a Coffee.
Hire me: asadmahmood8470@gmail.com
WhatsApp





View solution in original post

Replies 4 (4)

Asad-Mahmood
Trailblazer
209 37 42

This is an accepted solution.

Go to your online store -> customize -> settings -> custom css and paste this code there 

@media screen and (max-width: 749px) {
    .banner--medium:not(.banner--mobile-bottom):not(.banner--adapt) .banner__content {
        min-height: 16rem !important;
    }
div.slideshow__media.banner__media.media img {
    height: auto !important;
    object-fit: contain;
}
}

 

AsadMahmood_0-1722535049682.png

 

If my solution has been helpful, you can consider supporting me via Buy Me a Coffee.
Hire me: asadmahmood8470@gmail.com
WhatsApp





Patwalters
Tourist
9 0 2

Thank you so much! It worked! 

Asad-Mahmood
Trailblazer
209 37 42

Glad it worked for you

If my solution has been helpful, you can consider supporting me via Buy Me a Coffee.
Hire me: asadmahmood8470@gmail.com
WhatsApp





BSSCommerce-B2B
Shopify Partner
1969 564 566

Hi @Patwalters , 

I have reviewed your requirement, you just need to edit css script and the issue will be resolved.  You can follow my instructions! 

 

Step 1: Go to Admin -> Online store -> Theme > Edit code:

BSSCommerceB2B_0-1722538196502.png

 

Step 2: Search for the file base.css. And add this code snippet to the end of the file.

@media screen and (max-width: 749px) {
    .slideshow__media.banner__media.media img {
        object-fit: contain !important;
        height: auto !important;
    }
    .banner--medium:not(.banner--mobile-bottom):not(.banner--adapt) .banner__content {
        min-height: 19rem !important;
    }
}

Step 3: Save your code and reload this page.

=>> The result: 

BSSCommerceB2B_1-1722538294558.png

 

I hope these instructions will help you. If they are helpful, please give us likes and mark as the solution.

Have a nice day sir! 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now