Site logo

[Resolved] Remove Hyperlink Default Formatting For Specific Links

Home Forums Support [Resolved] Remove Hyperlink Default Formatting For Specific Links

Home Forums Support Remove Hyperlink Default Formatting For Specific Links

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2414820
    MMS

    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/

    #2414867
    David
    Staff
    Customer Support

    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;
    }
    #2414991
    MMS

    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.

    #2415119
    David
    Staff
    Customer Support

    Try this:

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

    Perfect, many thanks.

    #2416073
    David
    Staff
    Customer Support

    You’re welcome

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.