[Resolved] Cannot underline links

Home Forums Support [Resolved] Cannot underline links

Home Forums Support Cannot underline links

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #385414
    George

    I changed the link color, however the links are not underlined. I read in another post that I should add this CSS: a,
    a:visited {
    text-decoration: underline;
    }
    I tried it but it doesn’t work. This is a regular page, no page builder involved. How can I underline the links in posts and pages?

    #385456
    Tom
    Lead Developer
    Lead Developer

    Try this:

    a, a:visited, a:hover {
        text-decoration: underline;
    }
    #385473
    George

    Unfortunately this doesn’t work either.

    #385494
    Tom
    Lead Developer
    Lead Developer

    Can you link me to the site?

    #385497
    George
    #385501
    Tom
    Lead Developer
    Lead Developer

    Your CSS is broken. You need to close the block for your blockquote with a curly bracket: }

    #385506
    George

    This is how I have it in my Simple CSS: a, a:visited, a:hover {
    text-decoration: underline;
    }

    I also have this code in there to get rid of the post dates, but this doesn’t work either:
    .comment-meta {
    display: none;
    }

    So from what I can see, the CSS is not broken.

    #385508
    Tom
    Lead Developer
    Lead Developer

    Your blockquote CSS has an opening {, but no closing }.

    #385511
    George

    Aha, thanks, I had missed that. Now the underline is working. However now the post titles are underlined as well:
    https://www.screencast.com/t/OyXW6pxh
    What can I do so that only the links in the post body are underlined?

    Another question: Is there a way to only get rid of the post date, but not of the name of the poster. The CSS that I have gets rid of everything, but I just want to eliminate the post date:
    .comment-meta {
    display: none;
    }

    My second question is if there is a setting to eliminate the previous and next post links at the bottom of a post, or do I need CSS for that?
    https://www.screencast.com/t/ksKP3anKOWW

    #385593
    Leo
    Staff
    Customer Support

    By default WordPress excerpt strips all HTML so the links underline won’t work unless you use the more tag: https://docs.generatepress.com/article/using-the-more-tag/

    You can try this to underline the content only:

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

    Date can be removed using the customizer already: https://docs.generatepress.com/article/blog-overview/#blog-content

    Post navigation will be an option in the upcoming GP premium. For now try this CSS:

    .post-navigation {
        display: none;
    }

    Let me know.

    #386098
    George

    The underlining works with this code, but still all the post titles are underlined as well when I click on the “Blog” link in the main menu. That’s before I ever open a post and click on the ‘more’ tag.

    If there is no solution for this issue, could this code be modified so that the underline only happens on hover?

    #386113
    Leo
    Staff
    Customer Support

    Actually try this with more tag:

    .entry-content a,
    .entry-content a:visited,
    .entry-content a:hover {
        text-decoration: underline;
    }

    Let me know.

    #386117
    George

    This one works, thank you!

    #386190
    Leo
    Staff
    Customer Support

    No problem!

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