Shopify themes, liquid, logos, and UX
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.
Solved! Go to the solution
This is an accepted solution.
#history-back-btn {
background-color: black;
color: black;
border: 1px solid white;
}
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;
}
which .css file do I add it to please
figured it out Thanks soooooo much oh border color?
This is an accepted solution.
#history-back-btn {
background-color: black;
color: black;
border: 1px solid white;
}
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025