How do I add underline decoration to links on hover in paragraphs only?

  • I would like to add an underline decoration on hover to any link in my content that is not a heading, title, etc. In other words, I would like to add the decoration only to text that is in paragraphs on my pages. I’m more than comfortable working with the CSS Customizer, but so far I have only been able to get all of my links to adopt this behavior. Any help would be greatly appreciated.

    The blog I need help with is: (visible only to logged in users)

  • Adding this code to your CSS Customizer should do it.

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

    Because this is targeting just the entry-content, this will not apply the underline to any of the links in the navigation or the headlines, etc.

    Hope this helps. Let me know if you have any other questions.

  • That did the trick! I had a feeling there was something simple I was missing, and that was .entry-content. Many thanks!

  • The topic ‘How do I add underline decoration to links on hover in paragraphs only?’ is closed to new replies.