Removing Background and changing colour to specific text

Removing Background and changing colour to specific text

DLuxton
Visitor
1 0 0

Hi, 

New to shopify, 

I created a banner, in which i wanted to remove the background and change the colour to White, which i've done successfully using the following code:

However, i want to change the color of one of the words to red, leave the rest white.

 

Thanks. 

 

.banner__box {
background: transparent;
font-size: 50px;
}
.banner__text {
font-size: 51px;
color: white;
}

DLuxton_0-1748639494801.png

 

Replies 2 (2)

BiDeal-Discount
Shopify Partner
790 105 178

Hi @DLuxton 

Let try to use:

.banner__text {color: red;}
- Helpful? Like & Accept solution! Coffee tips fuel my dedication.
- BiDeal Bundle Volume Discounts: Upsell with discount bundles, quantity breaks, volume discounts & mix-and-match bundles. AOV+ with free gifts, free shipping & progressive cart
- Contact me via WhatsApp

DrewOswald
Shopify Partner
81 18 24

Italicize the word that you want to be red. For example if you wanted "UNAPOLOGETIC" to be red:

"UNFILTERED. UNCENSORED.

UNAPOLOGETIC." <= Italicized.

 

Then add this CSS in the Custom CSS area of that section:

(Note: This works because when you italicize a word it gets wrapped in an em tag like this <em>UNAPOLOGETIC.</em>)

.banner__text em {
    color: red;
    font-style: normal;
}

 

devDrew webDev · Need a developer? Send me a DM.
Follow me on Instagram for Shopify Tips & Tricks: https://www.instagram.com/devdrew.webdev/