hello. does anyone know how i can make this button white?
Topic summary
A user seeks help changing a button color to white in their Shopify cart drawer. An image shows the current button appearance.
Initial Solutions Attempted:
- Multiple CSS code snippets were provided targeting different selectors (
.your-button-class,div#CartDrawer .cart-drawer__empty-content a[href="/collections/all"]) - User reported these solutions did not work, questioning if existing code might be interfering
- Screenshots of existing code were shared for troubleshooting
Working Solution:
DaisyVo provided CSS targeting div#CartDrawer .cart-drawer__empty-content > a.button with white background and black text, plus removing box-shadow. This successfully resolved the issue.
Current Status:
The original problem is solved. User now has a follow-up question about making the button and text white on the customer login page as well. The discussion remains open for this new request.
Implementation Method:
Solutions involved adding custom CSS either to theme.css/base.css files or through Theme Settings > Custom CSS section.
Hi @silenceclothing , kindly provide your store URL please and if it is password protected, please share the password as well. Thanks
Hey @silenceclothing ,
To make the button white in this pop-up, you’ll need to modify the CSS in your Shopify theme. Here’s what you can do:
Follow These Steps:
-
Online Store
-
Themes
-
Click Customize to identify the specific class or ID of the button. Alternatively, you can use your browser’s developer tools (right-click the button > Inspect) to find its selector.
-
Edit Code
-
Find your theme’s CSS file (e.g., theme.css or base.css).
-
Add the following CSS rule:
.your-button-class {
background-color: white !important;
color: black !important; /* Adjust text color if necessary */
border: 1px solid black; /* Optional: Add a border for better visibility */
}
Replace .your-button-class with the actual class or ID of the button (you can find this using the browser’s developer tools).
If you provide more details about the theme you’re using or the button’s class/ID, I can tailor the instructions further!
If I was able to help you, please don’t forget to Like and mark it as the Solution!
If you’re looking for expert help with customization or coding, I’d be delighted to support you. Please don’t hesitate to reach out via the email in my signature below—I’m here to help bring your vision to life!
Best Regard,
Rajat
it did not work
- Go to Online Store → Theme → Edit code.
- Open your theme.css / based.css file and paste the code in the bottom of the file.
div#CartDrawer .cart-drawer__empty-content a[href="/collections/all"] {
color: black !important;
background: #ffff !important;
}
Result:
If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!
Paste the code at the bottom of the theme.css/base.css file.
Try this one.
- From your Shopify admin dashboard, click on “Online Store” and then “Themes”
- Find the theme that you want to edit and click on “Actions” and then “Edit code”.
- In the “theme. Liquid” file. Find the tag and paste the code below before the tag.
-
And Save.
-
Result:
Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!
To complete your requests, please follow these steps:
- Go to Shopify Admin > Online Store > Theme > Customize > Theme Settings > Custom CSS https://prnt.sc/i8ljAMlHJUKl
- Paste the code provided into the Custom CSS section.
div#CartDrawer .cart-drawer__empty-content > a.button {
background: white !important;
color: black !important;
}
div#CartDrawer .cart-drawer__empty-content > a.button::after {
box-shadow: none !important;
}
Here is the result:
I hope this helps
Best,
Daisy
thankyou! this worked perfect. do you know how i can make the button and text on customer login white also?





