How can I alter the color of my back button in the Dawn theme?

Solved

How can I alter the color of my back button in the Dawn theme?

shopjobie
Tourist
5 0 1

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
2139 616 520

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 or check out the website
Check out our interview with Shopify!

View solution in original post

Replies 4 (4)

ThePrimeWeb
Shopify Partner
2139 616 520

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 or check out the website
Check out our interview with Shopify!
shopjobie
Tourist
5 0 1

which .css file do I add it to please

 

shopjobie
Tourist
5 0 1

figured it out Thanks soooooo much  oh border color?

ThePrimeWeb
Shopify Partner
2139 616 520

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 or check out the website
Check out our interview with Shopify!