How can I set an image as the background in Dawn theme?

Topic summary

A user is attempting to add a background image to a specific section in Shopify’s Dawn theme but the CSS code isn’t working when added to base.css, despite working in browser inspect tools.

Troubleshooting attempts:

  • Initial CSS targeting the section ID didn’t apply the background image
  • Alternative selector targeting the multicolumn class also failed when added to base.css
  • Attempting to add code through the theme editor produced an error
  • Changes work in browser developer tools but don’t persist when coded into the stylesheet

Current solution:
A helper provided working CSS using the multicolumn class selector with specific height (500px) and background properties. However, they noted the original image has large pixel dimensions that may hide bottom text content. The code includes background-size: cover and background-position: center no-repeat to properly display the image.

The discussion appears resolved with functional CSS provided, though implementation location (where to add the code) may still need clarification.

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

Hello,

I’m looking to set an image as the background for the below section on my site. I used this code to do so but it doesn’t appear to be updating. Any help would be appreciated.

#shopify-section-template–19937624162620__cdba4c2c-f7e2-4015-bba0-6df3d95218c3 > div > div{
background-image: url(https://cdn.shopify.com/s/files/1/0777/8625/1580/files/Pink_Claims_Bg_2x_894a3701-1564-4de2-a28c-30db5b355562.png?v=1690216291);
background-size: cover;
background-position: center;

}

Here is a link to my store: https://2mxfae1std2au4o7-77786251580.shopifypreview.com

1 Like

Hi @md249 ,

Would you mind to try this another selector? Thanks.

.multicolumn.color-scheme-0deff096-1ea7-48ad-9f79-091d2d4c7b36.gradient.background-none.no-heading {
background-image: url(https://cdn.shopify.com/s/files/1/0777/8625/1580/files/Pink_Claims_Bg_2x_894a3701-1564-4de2-a28c-30d...);
background-size: cover;
background-position: center;
}

I hope it help.

Hi @Made4uo-Ribe

That didn’t appear to work. https://2mxfae1std2au4o7-77786251580.shopifypreview.com

The background color change though, using that selector.

hi @Made4uo-Ribe

Yes, it appears that when you make changes to that selector through the inspect tool, they are reflected. But when I code the changes in base.css, they don’t show up. For example:

But when I put that same code in base.css, I don’t see the new image displaying:

1 Like

Did you try to put in other places? like in the theme editor? or the specific css folder on that section?

Hi @Made4uo-Ribe I did try to put it into the theme editor, but received this error:

Is there somewhere else I should try adding the code?

1 Like

Can you share your URL website? Thanks!

Hi @Made4uo-Ribe

https://yoz9j15tjpqivxvg-77786251580.shopifypreview.com

Thanks! I try it on my own and this is the result.

The URL image that you like to add have a bigger pixels. So it wont show the buttom text.

.multicolumn.color-scheme-0deff096-1ea7-48ad-9f79-091d2d4c7b36.gradient.background-none.no-heading {
    width: 100%;
    height: 500px;
    background: url(https://cdn.shopify.com/s/files/1/0777/8625/1580/files/Pink_Claims_Bg_2x_894a3701-1564-4de2-a28c-30db5b355562.png?v=1690216291) no-repeat center;
    background-size: cover;
}