How to change image banner height size for mobile, for specific image (not for the whole website)
using dawn theme
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.
Hello, @Elay
Please share “Store URL”
Thanks!
Hi @Elay
- Go to Online Store → Theme → Edit code.
- Open your theme.liquid file
- 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
try this one code
I Pasted it in the custom css section in the image banner editor and nothing happened
you don’t need to paste there. try this one…
- Go to Online Store → Theme → Edit code.
- Open your theme.liquid file
- 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!
@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!


