Shopify themes, liquid, logos, and UX
I cant figure out how to change the color of a single word in shopify css.. i tried all the solutions i could find on here..
On my main image banner in dawn i have written ''RESILIENCE LONGEVITY & STRENGTH. PINE POLLEN'' I only want pine pollen to be yellow. Can anyone enlighten me? thank you.
Hi @Boreome
Thank you for reaching out to Shopify community.
In customize section, add pine pollen between span tag in Heading of Image Banner. Ex-
RESILIENCE LONGEVITY & STRENGTH. <span>PINE POLLEN</span>
Now go to your base.css file, target span of banner heading and change the color(copy the below code in the bottom of your css file)
.banner__heading span{
color: yellow;
}
This should change the text color of "Pine Pollen"
Screen shots for your reference:-
If the color didn't change, please send me your store URL so that I could provide you with detailed solution.
Do give it a try and let me know if this was helpful.
Thanks.
Thanks Harista,
I tried and i cant get it to work. My heading text customization box seams different than yours.. would you know why?
Its another problem i have.. I want to be able to put some spaces between sentences on some text content on other image banners (using Shift + Enter). It only seems possible with the type of text box that is on the screen shot you shared (with the text tools on top).
Anyway one problem at a time.
my web url is www.boreome.com
password: Wjust@196!ja$09QwNf
thanks!
If you like to put some space between "STRENGTH. PINE POLLEN" if you like to locate down the PINE POLLEN add "STRENGTH.<br>PINE POLLEN". I hope it help.
Hi Ribe, I still cant get the single word to change color even if i follow what you suggested.. Like i said my text box isnt the same as yours. do you have an idea what else i could try?
Here is my url: www.boreome.com
password: Wjust@196!ja$09QwNf
Hello, Oh I thought you already did with harsita's solution. I have another solution you can try.
You can edit the The text right? Can you write only the "RESILIENCE LONGEVITY & STRENGTH.". Then add this code.
h2.banner__heading.h0:after {
content: "PINE POLLEN";
color: yellow;
}
Result:
I hoe it help.
Hi Ribe, it worked but i have my website translated in french. Since this way of coding genericaly drops "Pine pollen" ant the end of the header it dosent translate it in the french version.
I understand i need to create a style in base.css and the use span to let it know what word i want to have assigned to the style.
Could you help my smooth brain understand how to code that style in my base.css and how to assign a word to that style.
Here is what i have been trying.. dont laugh
Thank you so much for your time.
You'll error your banner. 😅 I try something.
Still go to the Costumize.
And add this one in the Heading.
<p>RESILIENCE LONGEVITY & STRENGTH. <span class="custom-color">PINE POLLEN<span></p>
Then paste this one in the base.css.
h2.banner__heading.inline-richtext.h1 span {
color: yellow;
}
Then SAVE.
Hi Ribe, I did what you said and it wont work. here are the pictures.
Like in the first post. I dont seem to have the same text box that you in my theme editor.
What dawn theme version are you? Im using Version 10.
Im using 8.0.0.. Im not sure i can update without losing everything.. Would you have a solution for this version?
Hello, how are you doing, could you help me to do the same on some content paragraphs I have on my store?
Thank you.
Hi @Boreome ,
Would you mind to share your URL website? with password if its protected. Thanks!
Hello everyone,
in case anyone is still having trouble colorizing individual words in your theme, I got so tired of trying different workarounds that I decided to build my own app for it. It’s straightforward, free, and might make your life a bit easier. 🙂
https://apps.shopify.com/pulsar
Best,
Levi
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024