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 |
---|---|
142 | |
96 | |
79 | |
70 | |
69 |
This blog post is a recap of the webinar Getting Ready For BFCM: How To Run A Flash Sal...
By Jacqui Oct 3, 2023Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023