Change specific homepage button color without changing buy button

Solved

Change specific homepage button color without changing buy button

vayzen
Visitor
3 0 2

Hi everyone!

I'm after some help to change the colour of the buttons within the 'Image with text' sections of my homepage.

Currently, I am able to change the colour of these buttons by visiting 'Theme Settings' → 'Colors', then changing the 'Solid Button' colours. This works to an extent, although I can not change the button border colour, and any changes also impacts the colour of my 'Add to cart' button on product pages. I only wish to change the colour of these two buttons on the homepage alone.

Is there code I could add to custom css within the section via my shop builder, or alternatively, code I can change within the edit code page?

I would like the buttons body colour to be white (#FFFFFF), the outline to be a customised black (#272727), and the text to be black (#272727).

I have attached an image which shows the buttons I would like to change with red arrows. The green arrow is how I would like them to appear.

The link to my site is https://selfishcompany.com/ 

Any help would be very much appreciated!

vayzen_1-1685618569267.png

 

 

Accepted Solution (1)

Moeed
Shopify Partner
4950 1309 1592

This is an accepted solution.

Hey @vayzen 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code in the bottom of the file above </body> tag.

 

<style>
a.button.button--primary {
    background: white !important;
    color: black;
}
</style>

 

Capture.JPG


If I managed to help you then, don't forget to Like it and Mark it as Solution!

Best Regards,
Moeed

-Need a Shopify Specialist? Chat on WhatsApp
- Custom Design | Advanced Coding | Store Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️

View solution in original post

Replies 2 (2)

Moeed
Shopify Partner
4950 1309 1592

This is an accepted solution.

Hey @vayzen 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code in the bottom of the file above </body> tag.

 

<style>
a.button.button--primary {
    background: white !important;
    color: black;
}
</style>

 

Capture.JPG


If I managed to help you then, don't forget to Like it and Mark it as Solution!

Best Regards,
Moeed

-Need a Shopify Specialist? Chat on WhatsApp
- Custom Design | Advanced Coding | Store Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️
vayzen
Visitor
3 0 2

Hi Moeed,

That has worked perfectly - Thank you very  much!

All I did to get my custom black colour was change the colour name to the hex code.

All the best.