How can I fix overlapping issues with my Dawn theme background image?

Hi, I need help with adding a background image for the Dawn theme. I used a code to add my background but now its overlapping in my drop down menu, text box, and my announcement background disappeared.

I used this code below.

.gradient {
background: var(–gradient-background);
background-attachment: fixed;
background-image: url(https://cdn.shopify.com/s/files/1/0655/6113/3295/files/Untitled_design_21.png?v=1659313818) !important;
background-color: transparent !important;
background-position: top left !important;
background-size: cover !important;
}

Here is a picture of the issues that I am having. I believe its an issue with the code above since when I took it out, everything went back to normal but just without the background which I need. Please assist. Thank you!

@Popcorn - I think it is because you used .gradient instead of body… I think gradient class is used for too many components in dawn theme, each will have image

change .gradient to body and check

Hi, thank you for your response. I thought that was the case too. But when i swapped it out for body, my background didn’t show up at all and all there is was a white background. This isn’t my code. I tried other codes but my background didnt show up for those. This is the only one that worked so far but its messing up my other elements on my website :disappointed_face:

Hello @Popcorn

Where it’s messing up? can you share screenshots please?

@Popcorn - can you share your website link?

Hi! So the background code I inputted is messing up other parts of my website: announcement bars, dropdown menu, and text box. Here is a picture as reference:

Then I tried changing the code gradient to body and this is what happened; the background isnt showing up:

Sure, here you go

https://lua-wolves-crystals.myshopify.com/

https://lua-wolves-crystals.myshopify.com/

@Popcorn - change .gradient to body.gradient and check

I tried that but it didn’t work still :disappointed_face:

@Popcorn - can you share password to view page?

Sure. Here is the password: bahcri

@Popcorn - something really wrong, fields/text, nothing is visible on page

This is what I see from my side. After I put body or body.gradient, the background turned to this. It fixed the other issues but now theres no background. I believe its the coding and I’m assuming the code that I used is no longer compatible with the updated version of Dawn theme. Not sure on how to go from here.

@Popcorn - can you remove that code completely and we check again

I removed it and replaced it with the original coding. I’m back to the same issues as before. And then when I removed the whole code, the background is back to a white background.

@Popcorn - not able to add password, something wrong

My website isn’t published yet if thats the issue. But that’s the password to view my store. :slightly_smiling_face: