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 |
---|---|
290 | |
83 | |
54 | |
46 | |
43 |