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

Re: Mobile banner crops on dawn theme

Solved

Mobile banner crops on dawn theme

knrys
Tourist
4 0 0

Hi, my banner image crops on mobile and I looked most of the discussions and tried various css codes in them but none of them worked out. My site is gamaderma.com can anyone help me please?

Accepted Solutions (2)
comercioservice
Shopify Partner
265 37 31

This is an accepted solution.

@knrys please add this code also 

.banner--medium:not(.banner--mobile-bottom):not(.banner--adapt) .banner__content {
min-height: 15rem;
}

let me know 

Was my reply helpful? Click Like to let me know! Was your question answered? Mark it as an Accepted Solution.
Need store customizations, bug fixing or development ? Contact with us -- Support form for quick quote!
BFCM Big Deals: Big savings 25% off -on our Shopify FAQs apps!

View solution in original post

comercioservice
Shopify Partner
265 37 31

This is an accepted solution.

@knrys  here is the steps 
1, https://prnt.sc/5i6qGO96Ubqe
2, https://prnt.sc/FJ0HK_5ENIK2

Was my reply helpful? Click Like to let me know! Was your question answered? Mark it as an Accepted Solution.
Need store customizations, bug fixing or development ? Contact with us -- Support form for quick quote!
BFCM Big Deals: Big savings 25% off -on our Shopify FAQs apps!

View solution in original post

Replies 9 (9)

Moeed
Shopify Partner
6295 1711 2056

Hey @knrys 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

<style>
.banner__media.media.scroll-trigger.animate--fade-in img {
    object-fit: contain !important;
}
</style>

RESULT:

Moeed_0-1727982824807.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Create high-converting pages - PageFly Page Builder.


comercioservice
Shopify Partner
265 37 31

@knrys 

 
hi Hope you are well,
I’ve taken a look at what you need—just a little CSS magic, and everything will be fixed! Follow my steps, and you'll have it sorted in no time!

1, from admin, go to Online Store > Themes.
2, Actions > Edit code for your active theme.
3, Find and open the theme.liquid file, maybe in the Layout folder.
4, Look for the </head> tag and paste the code in the end

 

<style>

@media only screen and (max-width: 767px) {
 .banner__media.media.scroll-trigger.animate--fade-in img {
    object-fit: contain;
}
}
</style>
​

 

I hope it works for you, let me know, and If you'd like to discuss this more, don't hesitate to send me a PM
Thank you
Was my reply helpful? Click Like to let me know! Was your question answered? Mark it as an Accepted Solution.
Need store customizations, bug fixing or development ? Contact with us -- Support form for quick quote!
BFCM Big Deals: Big savings 25% off -on our Shopify FAQs apps!
knrys
Tourist
4 0 0

Thank you it worked but now there is grey spaces in top and bottom. Can I make it that only the banner looks in full resolution without spaces

comercioservice
Shopify Partner
265 37 31

This is an accepted solution.

@knrys please add this code also 

.banner--medium:not(.banner--mobile-bottom):not(.banner--adapt) .banner__content {
min-height: 15rem;
}

let me know 

Was my reply helpful? Click Like to let me know! Was your question answered? Mark it as an Accepted Solution.
Need store customizations, bug fixing or development ? Contact with us -- Support form for quick quote!
BFCM Big Deals: Big savings 25% off -on our Shopify FAQs apps!
comercioservice
Shopify Partner
265 37 31

@knrys 

if is it hard for you I can send you a staff account request then I can help you, please dm me 
Was my reply helpful? Click Like to let me know! Was your question answered? Mark it as an Accepted Solution.
Need store customizations, bug fixing or development ? Contact with us -- Support form for quick quote!
BFCM Big Deals: Big savings 25% off -on our Shopify FAQs apps!
knrys
Tourist
4 0 0

I couldn't find dm but filled the form in your website.

 

comercioservice
Shopify Partner
265 37 31

This is an accepted solution.

@knrys  here is the steps 
1, https://prnt.sc/5i6qGO96Ubqe
2, https://prnt.sc/FJ0HK_5ENIK2

Was my reply helpful? Click Like to let me know! Was your question answered? Mark it as an Accepted Solution.
Need store customizations, bug fixing or development ? Contact with us -- Support form for quick quote!
BFCM Big Deals: Big savings 25% off -on our Shopify FAQs apps!

polishedCode
Shopify Partner
24 9 10

Hey @knrys 

 

You could try updating the css with the following code.

 

@media screen and (max-width: 749px) {
.banner--medium:not(.banner--mobile-bottom):not(.banner--adapt) .banner__content {
min-height: 15rem;
}
.banner__media.media.scroll-trigger.animate--fade-in img {
object-fit:contain;
}
}

 

Updating the min height that is set should remove the grey space above and below the image

Screenshot 2024-10-03 at 2.22.06 PM.png

If this fixed your issue please Like and Accept as a Solution!
For custom Shopify solutions contact us Polished Code
Leave A Coffee Tip ❤️
knrys
Tourist
4 0 0

I added this to theme.liquid but it didn't work. Sorry I do not understand coding where should I exactly paste this?