What's your biggest current challenge? Have your say in Community Polls along the right column.

How to add background image of a section in DAWN with Custom CSS Code

Solved

How to add background image of a section in DAWN with Custom CSS Code

Weekenders
Tourist
19 0 1

Hello,

 

I am using Dawn, I want to change the background image of a section using Custom CSS. As it seems to be easiest way to do it. I add this code below, but nothing changes in my section. I have tried using a variety of section tags, but the tax I think I am using from inspect is not working and I have tried many variations. Any ideas?

 

{
background: url("https://cdn.shopify.com/s/files/1/0615/8116/4622/files/Background_Image.png?v=1730820255")
no-repeat;
background-size: cover;
}

Accepted Solution (1)
Webstablish
Shopify Partner
71 12 16

This is an accepted solution.

It is being overruled by a lower div, try this:

.rich-text.content-container{
  background: url("https://cdn.shopify.com/s/files/1/0615/8116/4622/files/Background_Image.png?v=1730820255")
    no-repeat;
  background-size: cover;
}
MenuQoL: Hide & Copy Menus | Tutorial
- Hide your seasonal menu items instead of throwing them away
- Copy navigation menus to save time

View solution in original post

Replies 7 (7)

Webstablish
Shopify Partner
71 12 16

Hi @Weekenders, can you share your website so we can have a look? Maybe it gets overruled by another CSS rule.

MenuQoL: Hide & Copy Menus | Tutorial
- Hide your seasonal menu items instead of throwing them away
- Copy navigation menus to save time
Weekenders
Tourist
19 0 1

TheWeekenders.ca - but I am using a draft to make these edits... is there a way I can share these drafts? Maybe try this: https://theweekenders.ca/?_ab=0&_fd=0&_sc=1 I am trying to make a change to each section on this page... starting with the Rich Text section.

Webstablish
Shopify Partner
71 12 16

This is an accepted solution.

It is being overruled by a lower div, try this:

.rich-text.content-container{
  background: url("https://cdn.shopify.com/s/files/1/0615/8116/4622/files/Background_Image.png?v=1730820255")
    no-repeat;
  background-size: cover;
}
MenuQoL: Hide & Copy Menus | Tutorial
- Hide your seasonal menu items instead of throwing them away
- Copy navigation menus to save time
Weekenders
Tourist
19 0 1

This worked for the Rich-text section, What about if I need to do the same with the image-with-text section? I used the same code, and it wont work for the image-with-text

 

Webstablish
Shopify Partner
71 12 16

The HTML structure is different between sections. In this case, the gradient class seems to be used by both sections (also contains the background property). So you could do this for both:

.gradient {
  background: url("https://cdn.shopify.com/s/files/1/0615/8116/4622/files/Background_Image.png?v=1730820255")
    no-repeat;
  background-size: cover;
}
MenuQoL: Hide & Copy Menus | Tutorial
- Hide your seasonal menu items instead of throwing them away
- Copy navigation menus to save time
Weekenders
Tourist
19 0 1

This worked like a charm!

Weekenders
Tourist
19 0 1

Thanks~

 

 

 

Weekenders_0-1730904238694.png