Re: Removing block square block behind pictures on mobile device

Solved

Removing block square block behind pictures on mobile device

radaApeta
Explorer
64 0 23

Hello,

how can i remove the square outline behind photos on mobile device (the big one). I want it to be the same as on desktop device, clear. Thank you very much 🙂


https://www.pickupstore.cz/
stažený soubor.jpg

valenta14
Accepted Solution (1)

kevinkarma55
Shopify Partner
101 11 11

This is an accepted solution.

Hi RadaApeta,

Go to Online store > Themes > click ... (three dot next to theme) > Edit code

Find a file called 'section-main-product.css'  and find a line of code matches the following 

 

.product-media-container.constrain-height.media-fit-contain {
    --contained-width: calc(var(--constrained-height)* var(--aspect-ratio));
    width: min(var(--contained-width), 100%);
}

 

 and before the last line of code '}' add the following extra line

 

border: none;

 

 making it look like this:

 

.product-media-container.constrain-height.media-fit-contain {
    --contained-width: calc(var(--constrained-height)* var(--aspect-ratio));
    width: min(var(--contained-width), 100%);
    border: none;
}

this will remove all the border on image but if it didn't work let me know and I can update

 

Please remember to Like & Mark Solution to the post if it helped you.
Thanks !
If you'd like to support me, you can Buy Me a Coffee
Need help with anything related to Frontend?
Checkout kevinkarma.me

View solution in original post

Reply 1 (1)

kevinkarma55
Shopify Partner
101 11 11

This is an accepted solution.

Hi RadaApeta,

Go to Online store > Themes > click ... (three dot next to theme) > Edit code

Find a file called 'section-main-product.css'  and find a line of code matches the following 

 

.product-media-container.constrain-height.media-fit-contain {
    --contained-width: calc(var(--constrained-height)* var(--aspect-ratio));
    width: min(var(--contained-width), 100%);
}

 

 and before the last line of code '}' add the following extra line

 

border: none;

 

 making it look like this:

 

.product-media-container.constrain-height.media-fit-contain {
    --contained-width: calc(var(--constrained-height)* var(--aspect-ratio));
    width: min(var(--contained-width), 100%);
    border: none;
}

this will remove all the border on image but if it didn't work let me know and I can update

 

Please remember to Like & Mark Solution to the post if it helped you.
Thanks !
If you'd like to support me, you can Buy Me a Coffee
Need help with anything related to Frontend?
Checkout kevinkarma.me