Help to Underline button text on a single button using custom css

Solved

Help to Underline button text on a single button using custom css

DanielUK
Tourist
8 0 1

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:

 

1.jpg

 

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:

 

2.jpg

 

Any assistance would be greatly appreciated!

Accepted Solution (1)

LuffyOnePiece
Shopify Partner
612 87 106

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

Sandeep Pangeni
Need help with your store? sandeeppangeni17@gmail.com
For quick response, Contact In WhatsApp +9779867521184

View solution in original post

Replies 3 (3)

LuffyOnePiece
Shopify Partner
612 87 106

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

Sandeep Pangeni
Need help with your store? sandeeppangeni17@gmail.com
For quick response, Contact In WhatsApp +9779867521184
DanielUK
Tourist
8 0 1

Thank you so much!

Rahul_dhiman
Shopify Expert
205 40 37

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;
}

zx.png

Let me know if the issue is solved.
please mark the solution as accepted and press the like button.
Thanks

 

Was I helpful?

Buy me a coffee



Want to modify or custom changes or bug fix on store . Or Need help with your store? Or -Want Complete Storefront
Email me -rahul@prowebcoder.com - Skype: live:dhiman.639
Checkout Some Free Sections Here