How to change custom liquid image size for mobile only

I am using Dawn theme and the custom liquid image is the perfect size on desktop, but too small on the mobile verison.

Here is the custom liquid code for the image:

<img style=“display: block; margin-left: auto; margin-right: auto; width: 50%” src=https://cdn.shopify.com/s/files/1/0572/0843/8922/files/Requests.png?v=1662668013>

I would like the width to be 100% on mobile.

The site address is www.retrokingstonmerch.ca and the liquid is “We want to hear your requests!”

1 Like

@SteveT2112

yes, please add this code

  1. Go to Online Store->Theme->Edit code
  2. Asset->/base.css ->paste below code at the bottom of the file.
@media (max-width: 749px) {
#shopify-section-template--14566121013386__16626921818b04b01f img {
    width: 100% !important;
}
}

Hi, @KetanKumar thank you for your response. Unfortunately, this code isn’t changing the size of the image on mobile.

1 Like