Site logo

Archived topic

Underline Links only in Text

11 replies · Started by Mira on October 16, 2021

Viewing posts 1–12 of 12

Hello,

I would like to underline links only in text, but not in buttons, navigation, header, footer or images.

At the moment I tried this code:

#main .entry-content a:not(.pp-button) {
text-decoration: underline;
}

#main .entry-content a:hover:not(.pp-button) {
text-decoration: none;
}

But there are still underlined links in Buttons or images.

Thank you!

Hi there,

try this CSS:

.entry-content p > a:not(:hover) {
    text-decoration: underline;
}

It will apply to only links that are inside a paragraph, and only when its not hovered.

Hi there,

thank you very much. I tried the code and it is working for the buttons.

The text links on my images (e.g. my homepage header is covered with a text) are still underlined. Do you know how I can change this?

That works perfectly, thank you :)

Glad to be of help

Hi there,

Is not work for me. I would like to underline links only in text (content), not in buttons, navigation, header, footer or images. I have setup Customize > General: Underline links > Not on hover with Cache dynamic CSS. Clear the cache too.

Can you help me, please?

Hi there,

can you raise a new topic, where you can share a link to your site so i can see whats required?

The site is using Elementor - and its applying its own underline styles. Not sure if Elementor has a style setting for that. If not then try this CSS:

.elementor p a {
    text-decoration: underline;
}

Hi David,

It's work as well. Thank you for your help!

You're welcome

This archived topic is closed to new replies.