Solved

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

MT27
Explorer
68 6 3

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
1045 271 213

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? Contact me here

View solution in original post

Replies 6 (6)

ThePrimeWeb
Shopify Partner
1045 271 213

Hey @MT27,

Are all the negative margin values added by you?

Was I helpful?

Buy me a coffee

🙂

Need help with your store? Contact me here
MT27
Explorer
68 6 3

yes

ThePrimeWeb
Shopify Partner
1045 271 213

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? Contact me here

ThePrimeWeb
Shopify Partner
1045 271 213

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? Contact me here
MT27
Explorer
68 6 3

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
1045 271 213

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? Contact me here