Dawn Theme - Mobile Banner Image Cut off

Topic summary

Mobile banner image in the Dawn theme is being cropped on phones, while the desktop version looks fine. The store owner tried prior code fixes without success.

Proposed fix 1: Edit theme.liquid and add custom code (placed above ). The shared result shows the image letterboxed with large gray bars on mobile, which the owner does not want. Screenshots were provided to illustrate the outcome.

Proposed fix 2: Add CSS to the theme’s CSS file: .banner__media img { object-fit: contain !important; } and remove overlay backgrounds. This preserves the full image but still introduces empty space (gray bars), so it doesn’t meet the owner’s goal.

Technical note: object-fit: contain shows the entire image but adds bars when the image aspect ratio doesn’t match the container; object-fit: cover fills the container but crops the image.

Status: Unresolved. The owner seeks a way to display the full image on mobile without gray bars; no agreed solution or action items yet.

Summarized with AI on December 17. AI used: gpt-5.

My Image Banner for desktop looks great but in the mobile version it cuts it off majorly. I’ve tried codes found in other discussions but they did not work for me. Website is www.silverandash.co to view the issue.

Thanks for any help!

1 Like

Hey @silverandashco

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code in the bottom of the file above tag


RESULT:

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

Thanks Moeed - the problem is I don’t want those big gray bars involved. Is there a way to fix that?

Hi @silverandashco

Try this one.

  1. From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  2. Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  3. In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
.banner__media img {
    object-fit: contain !important;
}
.banner:after, .banner__media:after {
    background: transparent !important;
}

Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!

Thank you for your response! However, it’s still not the full image so not what I’m looking for. Any way to still get the full image with no gray bars?