Solved

change colors on my back button

shopjobie
Visitor
3 0 0

I added a back button with this code <button onclick="history.back()">GO BACK</button> how can I change the color of background and text of just this button?  I am using the Dawn theme.

Accepted Solution (1)
ThePrimeWeb
Shopify Partner
1157 299 229

This is an accepted solution.

#history-back-btn {
   background-color: black;
   color: black;
   border: 1px solid white;
}
Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com

View solution in original post

Replies 4 (4)

ThePrimeWeb
Shopify Partner
1157 299 229

Please replace the button HTML with this, adding an ID so we can target it.

<button id="history-back-btn" onclick="history.back()">GO BACK</button>

 

Then apply the CSS for this

"background-color" for the background

"color" for the text color

#history-back-btn {
   background-color: black;
   color: black;
}

 

Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com
shopjobie
Visitor
3 0 0

which .css file do I add it to please

 

shopjobie
Visitor
3 0 0

figured it out Thanks soooooo much  oh border color?

ThePrimeWeb
Shopify Partner
1157 299 229

This is an accepted solution.

#history-back-btn {
   background-color: black;
   color: black;
   border: 1px solid white;
}
Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com