Shopify themes, liquid, logos, and UX
Hello, I was wondering If I can change the color of "No More" In my Heading to a different color: Hex: #FB6107
Website: www.ecogarby.com
Password: zzz
Solved! Go to the solution
This is an accepted solution.
@Acid2Rain,
1. In your Shopify Admin go to online store > themes > actions > edit code
2. In your theme.liquid file, find the </body> (press CTRL + F or command + F on Mac)
3. paste this code right above the </body> tag:
<script>
function changeTextColor(){
var color = "#FB6107";
var $el = document.querySelector(`.image-with-text-overlay__heading`);
if (!$el){
return;
}
var text = $el.textContent;
var updated = text.replace("No More", `<span style="color:${color};">No More</span>`)
$el.innerHTML = updated
}
changeTextColor();
</script>
This is not the most ideal way to go about it but it will resolve your problem.
Kind regards,
Diego
Please check following URL for help
https://www.quora.com/How-can-I-change-the-color-of-one-word-in-HTML
This is an accepted solution.
@Acid2Rain,
1. In your Shopify Admin go to online store > themes > actions > edit code
2. In your theme.liquid file, find the </body> (press CTRL + F or command + F on Mac)
3. paste this code right above the </body> tag:
<script>
function changeTextColor(){
var color = "#FB6107";
var $el = document.querySelector(`.image-with-text-overlay__heading`);
if (!$el){
return;
}
var text = $el.textContent;
var updated = text.replace("No More", `<span style="color:${color};">No More</span>`)
$el.innerHTML = updated
}
changeTextColor();
</script>
This is not the most ideal way to go about it but it will resolve your problem.
Kind regards,
Diego
User | RANK |
---|---|
180 | |
159 | |
76 | |
36 | |
33 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023