I added a background image to the Dawn theme, but now my image banner is affected by it

Solved

I added a background image to the Dawn theme, but now my image banner is affected by it

RainbowSweets
Tourist
16 0 2

Hello,

 

I'm trying to design a new website for our business, and added a background image to the Dawn theme. I have an image banner that looked fine before the background code was added to assets/base.css. After adding this snippet to the end of the code the text field in the image banner that was previously displayed with a transparent background, now picked up the website background. How to I get rid of it?

 

This is the code that was added to the assets/base.css file;

 

.gradient {
background: var(--gradient-background);
background-attachment: fixed;
background-image: url(https://cdn.shopify.com/s/files/1/0678/9208/4964/files/pink_yellow_Coming_Soon_retro_large_eba23ef8-...) !important;
background-color: transparent !important;
background-position: top left !important;
background-size: cover !important;
}

 

Screenshot 2024-08-06 131327.png

 

Any input would be greatly appreciated. 

 

Regards,

Mira

Accepted Solution (1)

Sweans
Shopify Partner
396 76 117

This is an accepted solution.

Hi @RainbowSweets 

 

To make the banner content tranbsparent, you need to add another set of CSS code to you asset/baces.css.

This issue is caused because both the body and the banner text element has the same class.

To remove this conflict, add the following code below the custom background style you applied:

 

.banner__box.content-container.gradient {
    background: transparent !important;
    background-image: none !important;
}

 

NB: You might need to interchange the class name based on your theme version and section.

 

I hope this helps! If it does, please like it and mark it as a solution!

If you need further assistance, feel free to reach out!

 

Regards,

Sweans

- Was my reply helpful? Please Like and Accept the Solution or let me know by Buying me coffee!
- Want to modify or custom changes on store Hire me.
- Feel free to contact me at info@sweans.com regarding any help.
- To know more about me check out www.sweans.com

View solution in original post

Replies 2 (2)

Sweans
Shopify Partner
396 76 117

This is an accepted solution.

Hi @RainbowSweets 

 

To make the banner content tranbsparent, you need to add another set of CSS code to you asset/baces.css.

This issue is caused because both the body and the banner text element has the same class.

To remove this conflict, add the following code below the custom background style you applied:

 

.banner__box.content-container.gradient {
    background: transparent !important;
    background-image: none !important;
}

 

NB: You might need to interchange the class name based on your theme version and section.

 

I hope this helps! If it does, please like it and mark it as a solution!

If you need further assistance, feel free to reach out!

 

Regards,

Sweans

- Was my reply helpful? Please Like and Accept the Solution or let me know by Buying me coffee!
- Want to modify or custom changes on store Hire me.
- Feel free to contact me at info@sweans.com regarding any help.
- To know more about me check out www.sweans.com

RainbowSweets
Tourist
16 0 2

Thank you for the help! It worked like a charm! 👌🏼