I have enabled the Follow on Shop button in my footer, but I would like to change the color of the button from blue to black. Can anyone help with that?
This is what I have currently:
Thank you,
Could you please provide more details, like which theme you are using and the link to your website so that I can have a look.
Currently using Dawn 9.0.0
Here is a quick update about your “follow on shop” button. I see that you have a third-party App or something from which the button is coming. You will have to find the exact file where the CSS is coming from and then add the following. (It would be the same code for both process)
Because it is from a third-party app. I am not sure if it will work or not, but you can try the following steps: Hopefully, it will work. follow the image for guidelines.
.follow-icon-wrapper {
z - index: auto;
background: black;
border-radius: 44px;
}
span.follow-icon-wrapper:hover {
background: #4e4545;
}
If it solves the issue please mark it as solved!
Please add below css code at bottom of assets/base.css file
.follow-icon-wrapper:before{
background: #000;
border: 1px solid #000;
}
Thank you.
Hello @JasonBoyd
You can try this code: it will be helpful to you
Go to the Online Store->Theme->Edit code->Assets->base.css>Add this code at the bottom
.follow-icon-wrapper:before {
background: #000 !important;
border: 1px solid #000 !important;
}
@Web-Wizard This is coming from within the Dawn theme itself, not a third-party app.
I tried the advised code but it did not work.
@oscprofessional & @Denishamakwana I tried the code you both suggested as well, but it didn’t work either.
Code was added to the bottom of the base.css.
Hi @JasonBoyd , It did not work because the CSS code was not coming from “base.css”. I would suggest you remove that code from “base.css” and add the same code in “section-footer.css”. Hopefully, this will work.
Did we ever get this to work. I have had no luck for either suggestion above.
Hi, the other options did not work for me either but I found this way that worked for me. Go into your global.js and paste in this code you can now change it to how you wish as long as you follow the format. I got the idea when trying to change the CSS of shopify forms:
// Follow on Shop Button
document.addEventListener("DOMContentLoaded", function () {
const observer = new MutationObserver(() => {
const shopFollow = document.querySelector("shop-follow-button");
if (shopFollow && shopFollow.shadowRoot) {
const btn = shopFollow.shadowRoot.querySelector("button");
if (btn) {
// Insert
btn.style.backgroundColor = "#E72027"; //Button Color
btn.style.color = "#ffffff"; //Text Color
btn.style.borderRadius = "15px"; // Optional
// Change the inner div background to fit with button color
const innerDiv = btn.querySelector(".absolute.inset-y-0");
if (innerDiv) {
innerDiv.style.backgroundColor = "#E72027";
innerDiv.style.borderRadius = "15px";
}
observer.disconnect(); // Stop watching after change
}
}
});
observer.observe(document.body, { childList: true, subtree: true });
});