Fill the gaps rigth and left without making the image (gif) smaller

Solved

Fill the gaps rigth and left without making the image (gif) smaller

MT27
Pathfinder
162 6 16

Please help me with the css, to fill the gaps right and left without changing the size of the image (gif) 

URL: https://matibrnd.com/

Pass: biangu

MT27_0-1705597223930.png

 

Accepted Solution (1)
ThePrimeWeb
Shopify Partner
2138 616 502

This is an accepted solution.

Hey @MT27,

You should try this. I think this is as far as I can customize it with CSS only

@media only screen and (max-width: 759px) {
    section#shopify-section-template--18448488431883__image_banner_JL4YDe .banner__media.media {
        background-color: black;
    }
    
    section#shopify-section-template--18448488431883__image_banner_JL4YDe .banner__media.media img {
        max-width: 60%;
        left: 50%;
        transform: translateX(-50%);
    }    
}
Was I helpful?

Buy me a coffee

🙂

Need help with your store? [email protected] or check out the website
Check out our interview with Shopify!

View solution in original post

Replies 6 (6)

ThePrimeWeb
Shopify Partner
2138 616 502

Hey @MT27,

Are all the negative margin values added by you?

Was I helpful?

Buy me a coffee

🙂

Need help with your store? [email protected] or check out the website
Check out our interview with Shopify!
MT27
Pathfinder
162 6 16

yes

ThePrimeWeb
Shopify Partner
2138 616 502

I see, generally it's not a good idea to do that because it causes unexpected behaviours. Let me look into it and give you a solution.

Was I helpful?

Buy me a coffee

🙂

Need help with your store? [email protected] or check out the website
Check out our interview with Shopify!

ThePrimeWeb
Shopify Partner
2138 616 502

Hey @MT27,

This should work out for you. Paste this into the Custom CSS and test it.

@media only screen and (max-width: 759px) {
    #shopify-section-template--18448488431883__image_banner_JL4YDe .banner__media.media {
        margin-bottom: 0px !important;
        margin-top: 0px !important;
    }  

    #shopify-section-template--18448488431883__0d36fe3e-71e5-4265-b621-f33e9f51b4b0 .banner {
        margin-bottom: 0 !important;
    }

    #shopify-section-template--18448488431883__image_banner_JL4YDe div#Banner-template--18448488431883__image_banner_JL4YDe {
        min-height: 18rem !important;
    }
}
Was I helpful?

Buy me a coffee

🙂

Need help with your store? [email protected] or check out the website
Check out our interview with Shopify!
MT27
Pathfinder
162 6 16

Hi, it took the image (the gif spinning) down rather than feeling the gaps left and right. I want the gif to stay at the height bc I want to cat that part of the main banner. 

MT27_0-1705847380992.png

 

ThePrimeWeb
Shopify Partner
2138 616 502

This is an accepted solution.

Hey @MT27,

You should try this. I think this is as far as I can customize it with CSS only

@media only screen and (max-width: 759px) {
    section#shopify-section-template--18448488431883__image_banner_JL4YDe .banner__media.media {
        background-color: black;
    }
    
    section#shopify-section-template--18448488431883__image_banner_JL4YDe .banner__media.media img {
        max-width: 60%;
        left: 50%;
        transform: translateX(-50%);
    }    
}
Was I helpful?

Buy me a coffee

🙂

Need help with your store? [email protected] or check out the website
Check out our interview with Shopify!