All things Shopify and commerce
I'd like to underline the text inside a button on an "image banner" section.
My website is www.reflektclothing.co.uk using Dawn 14.0.0
I don't want ALL buttons to have their text underlined, just this one:
I found a code on another thread:
<style>
a.button.button--secondary:after {
box-shadow: unset !important;
}
a.button.button--secondary {
text-decoration: underline !important;
}
</style>
If I add this to Custom CSS it seems to work in the preview window, but it won't let me save, and reports an error:
Any assistance would be greatly appreciated!
Solved! Go to the solution
This is an accepted solution.
Hi @DanielUK ,
Add below CSS on custom css and donot use style tag inside the custom css.
a.button.button--secondary {
text-decoration: underline;
}
Thank you
This is an accepted solution.
Hi @DanielUK ,
Add below CSS on custom css and donot use style tag inside the custom css.
a.button.button--secondary {
text-decoration: underline;
}
Thank you
Thank you so much!
Hello @DanielUK ,
Please find below the screenshot and the CSS, and add css as per screenshot.
this CSS will underline only the required button and will not effect other buttons.
a.button.button--secondary {
text-decoration: underline;
}
.button--secondary:after {
--border-opacity: none;
}
Let me know if the issue is solved.
please mark the solution as accepted and press the like button.
Thanks
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025