New Shopify Certification now available: Liquid Storefronts for Theme Developers

How to remove underline on a hyperlink in Craft Theme

Solved
CaptBret
Excursionist
32 0 12

I would like to remove the underlines from on page hyperlinks.  I'd like to remove both the constant underline and the hover underline.  The hyperlinks are on various pages, not the header or footer. 

 

I have tried several code edits that were suggested in previous posts, but nothing has worked so far.

 

This is code suggested a few times to be added to the liquid or base file but it didn't work for me.

a {
text-decoration: none !important;
}

 

Any help would be greatly appreciated!

 

Accepted Solution (1)
topnewyork
Explorer
153 22 19

This is an accepted solution.

Hi @CaptBret 

Follow these Steps:
Go to Online Store Edit Code Find theme.liquid file 
Add the following code in the bottom of the file above </body> tag

{% style %}
a {
    text-decoration: none;
}
{% endstyle %}

topnewyork_0-1696517566171.png

If I managed to help you then, don't forget to Like it and Mark it as Solutions.

 

Need a Shopify developer?
Hire us at topnewyorkwebdesign.com
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel

View solution in original post

Replies 9 (9)
topnewyork
Explorer
153 22 19

@CaptBret Would you mind to share your store URL website, with password if its protected? Thanks!

Need a Shopify developer?
Hire us at topnewyorkwebdesign.com
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel
CaptBret
Excursionist
32 0 12
topnewyork
Explorer
153 22 19

@CaptBret can you share the screenshot where you are facing the issue?

Need a Shopify developer?
Hire us at topnewyorkwebdesign.com
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel
CaptBret
Excursionist
32 0 12

These are on a collection page.  The text that is underlined has hyperlinks.  I have not added hyperlinks to the rest yet. 2023-10-5.JPG

topnewyork
Explorer
153 22 19

@CaptBret please share the page link.

Need a Shopify developer?
Hire us at topnewyorkwebdesign.com
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel
Made4uo-Ribe
Shopify Partner
4235 979 1193

Hi @CaptBret 

Where we can find this page? We check ypour page but couldnt find the page that you like to remove the underline. Can you share it with us. Thanks!

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

Made4uo.com


topnewyork
Explorer
153 22 19

This is an accepted solution.

Hi @CaptBret 

Follow these Steps:
Go to Online Store Edit Code Find theme.liquid file 
Add the following code in the bottom of the file above </body> tag

{% style %}
a {
    text-decoration: none;
}
{% endstyle %}

topnewyork_0-1696517566171.png

If I managed to help you then, don't forget to Like it and Mark it as Solutions.

 

Need a Shopify developer?
Hire us at topnewyorkwebdesign.com
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel
CaptBret
Excursionist
32 0 12

Thank you, this worked perfectly.  I apologize for the delayed reply, shopify blocked my messages as spam.  Apparently we were working too quickly and I sent too many messages.