Product image - full width on mobile

Product image - full width on mobile

ellacoker
Shopify Partner
270 1 64

Hello everyone, 

I would like my product image to come full width only on mobile. How do I go about this? Thank you. P.s I would like this accross my whole store.

URL: https://www.habooequestrian.com.au/products/spf-30-base-layers

Screenshot 2025-04-09 at 10.07.26.png

Replies 2 (2)

B2Bridge
Explorer
363 75 91

Hi @ellacoker   , you can follow these steps:

Step 1: Open Online Store -> Themes -> Edit code.

Step 2: Find component-card.css file

Step 3: Paste this code at the bottom of the file

 

@media screen and (max-width: 749px) {
    .product-media-container.media-type-image.media-fit-contain.global-media-settings.gradient.constrain-height {
        margin: 0!important;
        width: 100%!important;
    }
}

 

Screenshot_1.png

If this is helpful, please let us know by giving us a like and marking it as a solution. Thank you 😍

B2Bridge: All-in-one B2B wholesale solution, enabling merchants to set up a complete B2B store quickly and without coding.
With features like customizable registration forms, customer segmentation, and tailored price lists, it simplifies wholesale management.
B2Bridge also includes a dedicated Quick Order page and flexible Net Payment Terms, streamlining operations for wholesalers and enhancing the buying experience.

Dotsquares
Shopify Partner
390 24 52

Hi @ellacoker 

In the themes option under Online Store edit the code and paste the below CSS in the CSS file.

@media screen and (max-width: 768px) {
.product__media,
.product__media img,
.product-gallery__media,
.product-media,
.product-media img {
width: 100% !important;
max-width: 100% !important;
height: auto !important;
object-fit: cover;
}
}

Dotsquares Ltd


Problem Solved? ✔ Accept and Like solution to help future merchants.


Shopify Partner Directory | Trustpilot | Portfolio