All things Shopify and commerce
Hi,
My **edited by Community Moderator** homepage sections all have the "Background 2" color scheme and I cannot seem to be able to change the color of the buttons "Learn More" and "Shop now" from the current black (which corresponds to the "Text" secondary colors in the theme color settings) to the Accent 1 color (the green color). The buttons simply take the color of the black text.
Thanks in advance for any help 🙏!
Solved! Go to the solution
This is an accepted solution.
Hi there!
To change your button colors you can create a custom class in your .css.
Try putting the following code into the assets/component-image-with-text.css file.
.image-with-text__content .image-with-text__text+.button {
background-color: #0c91c7;
color: #fff;
}
.image-with-text__content .image-with-text__text+.button:after {
display: none; /*this will hide the border around the button if you want*/
}
This will change the button color and text color of all the 'Shop now' and 'Learn more' buttons.
Replace 'red' and 'black' with the background and text colors you want for the button :). You can use the hex code of specific colors here to get it exactly how you want!
Hello,
Thank for your answer but I already played around with the theme settings extensively. I may be missing something but since the button uses the text color ("Text" secondary colors in the theme color) if I change that color, the text changes color too... I already tested that.
This is an accepted solution.
Hi there!
To change your button colors you can create a custom class in your .css.
Try putting the following code into the assets/component-image-with-text.css file.
.image-with-text__content .image-with-text__text+.button {
background-color: #0c91c7;
color: #fff;
}
.image-with-text__content .image-with-text__text+.button:after {
display: none; /*this will hide the border around the button if you want*/
}
This will change the button color and text color of all the 'Shop now' and 'Learn more' buttons.
Replace 'red' and 'black' with the background and text colors you want for the button :). You can use the hex code of specific colors here to get it exactly how you want!
Hi @Snow_Wolf,
This code will help to change the color of your "Learn more" and "Shop now" text to your green color
- From your Shopify admin, navigate to Sales channels > Online store > Themes > Actions > Edit code
- Open the base.css file under the Assets section
- Paste this code at the bottom of that file
.button, .button-label, .shopify-challenge__button, .customer button {
background: #76be51;
}
- Hit Save
I hope it helps.
Thanks @AvadaCommerce this is quite helpful! Only issue is that it makes ALL buttons into that shade. Is it possible to modify so as to affect only the buttons that are on the "Background 2" color scheme? Or for example, how do I modify the "Contact us" button to be white instead of green?
How can I also specify the color I want for the buttons outline?
Thank you!
Hi there!
This might be possible, but for some reason your site link was removed. Can you re-share?
How would you then change the text of the button? So this worked for the background, but what if i want the text to be another color?
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024