How to change image banner height size for mobile for specific image

Topic summary

A Shopify store owner using the Dawn theme seeks to reduce image banner heights on mobile devices for specific images only, not site-wide.

Initial Solution Attempt:

  • Helper provides CSS code to be added to theme.liquid file before </head> tag
  • User clarifies they need targeting for specific images, not global changes

Refinement Process:

  • User shares three homepage banner images via screenshots requiring height adjustment
  • Helper provides updated CSS targeting specific elements
  • User attempts placing code in image banner editor’s custom CSS section without success

Current Issue:

  • When CSS is correctly placed in theme.liquid, it successfully reduces banner heights but unintentionally affects the hero image as well
  • Helper acknowledges the problem: the banners and hero image share the same CSS classes, causing the styling to apply to both

Status: Unresolved. The discussion ends without a working solution that targets only the three specific image banners while excluding the hero image.

Summarized with AI on November 1. AI used: claude-sonnet-4-5-20250929.

How to change image banner height size for mobile, for specific image (not for the whole website)
using dawn theme

Hello, @Elay
Please share “Store URL”
Thanks!

https://countinghearts.com/

Hi @Elay

  1. Go to Online Store → Theme → Edit code.
  2. Open your theme.liquid file
  3. In theme.liquid, paste the below code before

If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!

Hi, I want it to be on a specific image not for across all the website

Please share screen shot of those specific image which you want to change..
Thank you

This 3 images in the homepage

try this one code


I Pasted it in the custom css section in the image banner editor and nothing happened

@topnewyork

you don’t need to paste there. try this one…

  1. Go to Online Store → Theme → Edit code.
  2. Open your theme.liquid file
  3. In theme.liquid, paste the below code before

It works but it affecting also the hero image, which i don’t want it. only on the image banners.
Thanks for the help!

@topnewyork

1 Like

@Elay Sorry for late reply, You have used the same CSS classes, which is why they will also apply to the hero image.yoyu
Thank you!