Site logo

Archived topic

Remove Hyperlink Default Formatting For Specific Links

5 replies · Started by MMS on November 14, 2022

Viewing posts 1–6 of 6

Hi, I have formatted hyperlinks to have a specific color, bold and underlined in the global customizer (Additional CSS) but now want to remove the formatting completely for some specified links in the content. I've tried the following:-

.remove-link-decoration a {
text-decoration: none;
}

And then added 'remove-link-decoration' in the Advanced > Additional CSS Classes field for the specific links but it doesn't seem to work.

Here is a link to a page on the site where you can see the normal formatting. https://makemesustainable.com/is-tissue-paper-biodegradable/

Hi there,

i see a couple of CSS rules that add style to your links - there is this:


.entry-content li a,
.entry-content li a:hover,
.entry-content p a,
.entry-content p a:hover {
    border-bottom: 2px solid currentcolor
}

Which adds a bottom border to the link. If thats what you want removing, the your CSS needs to be:


.remove-link-decoration a {
    border-bottom: unset !important;
}

Thanks, that removes the underline but not the bold text of color. I'd like to set those to normal font-weight and color=black.

Try this:


.remove-link-decoration a {
    border-bottom: unset !important;
    color: #000 !important;
    font-weight: 400 !important;
} 

Perfect, many thanks.

You're welcome

This archived topic is closed to new replies.