Remove Hyperlink Underline on Hover for Buttons

Hello, I want to have only hyperlinks in paragraphs underlined on hover and have used the following code to achieve this throughout the site.

.site a:hover {
text-decoration:underline;
}

.site .menu-item a:hover {
text-decoration: none;
}

How do I then remove the resulting hyperlink underline on hover for all buttons? And can I also remove this on header tags?

Thank you!

Hey there,

Thanks for writing in! You can give your hyperlinks a class e.g custom-link and then use the following code:

.custom-link:hover { 
    text-decoration:underline; 
}

This way it will only be applied to your given anchor tags. Hope this helps!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.