Background Color of by now button

Background Color of by now button

raja18181-
Excursionist
33 0 5

Screenshot_2024-08-02-18-30-14-155_com.android.chrome-edit.jpg

Hey there, I want to change background Color of "Buy it now" button to black Color. Please help me to change the yellow colour to black Color. I also want to mention that everyone button on my page is yellow, Like "add to cart button" "Buy now button". I want to change these buttons background Color to black. 

 

My website: www.azadifit.com

Replies 7 (7)

taimoor_zia
Shopify Partner
2 0 0

Hi Raja,

To change the background color of all buttons, follow these steps:

  1. Go to the theme customizer.
  2. Navigate to Theme Settings > Colors.
  3. Look for the Button Background Color option.

In the latest themes, you may find a Color Scheme section instead, where you can make the adjustments.

raja18181-
Excursionist
33 0 5

Please write a code for this.

taimoor_zia
Shopify Partner
2 0 0

You can add this css code in your base.css file

button.button--primary {
background-color: #000;
color: #fff;
--buttons-border-width: unset;
}

 

namphan
Shopify Partner
2695 349 397

Hi @raja18181-,

Please go to Actions > Edit code > Assets > base.css file and paste this at the bottom of the file:

.shopify-payment-button__button {
    background: #000 !important;
    color: #fff;
}
.shopify-payment-button__button--unbranded:after {
    --color-button: 18, 18, 18;
}
Coffee tips fuels my dedication.
Shopify Development Service
PageFly Page Builder Optimize your Shopify store (Free plan available)
Need help with your store? namphan992@gmail.com
raja18181-
Excursionist
33 0 5

Ok it worked. Now how can I add buy it now text on it because it makes the whole area black as you can see in the attached picture. Please write a code to solve this. 

Screenshot_2024-08-02-22-36-30-174_com.android.chrome-edit.jpg

namphan
Shopify Partner
2695 349 397

Hi @raja18181-,

Please change code:

.shopify-payment-button__button {
    background: #000 !important;
    color: #fff !important;
}
.shopify-payment-button__button--unbranded:after {
    --color-button: 18, 18, 18;
}
Coffee tips fuels my dedication.
Shopify Development Service
PageFly Page Builder Optimize your Shopify store (Free plan available)
Need help with your store? namphan992@gmail.com

Made4uo-Ribe
Shopify Partner
10211 2427 3078

Hi @raja18181- 

Check this one. 

From you Admin page, go to Online Store > Themes

Select the theme you want to edit

Under the Asset folder, open the main.css(base.css, style.css or theme.css)

Then place the code below at the very bottom of the file.

 

.shopify-payment-button__button--unbranded {
    background: black !important;
    color: white;
}

 

And save. 

Result:

Made4uoRibe_0-1722633762597.png

 

 

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.