Site logo

Archived topic

Underline links on hover

21 replies · Started by Gianluca on September 6, 2017

Viewing posts 1–15 of 22

Hi Tom,

I'm trying to customize a few things (GeneratePress Premium) and I was wondering if there is an option or CSS to underline links only on hover.

Thank you in advance!

It works, thank you!

What if I would like to underline only links inside content and exclude blog post titles (h1, h2 etc)?

Hmm this instead:

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

Try this instead:

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

This code works inside articles but not on the homepage, where I replaced the "Read More" link with buttons.

Any idea how to achieve the same also on the homepage?

Also, is it possible to change the "Read More" link to the top of the page?

Can you link me to the site?

Yes, sure it's still "under construction" but you can see the changes.

 

Adjusted the code above.

The code above unfortunately works for "read more" buttons in homepage, but not for other buttons placed inside articles, pages etc

Any idea how to remove the underline on every button and keep on other links?

Probably solved with the CSS

.inside-article a:not(.button.ghost):hover {
    text-decoration: underline;
}

What do you think?

Thank you

No, it remove underline on normal links :(

Hmm try:

.entry-content a:not(.read-more):not(.button):hover {
    text-decoration: underline;
}

Perfect, thank you!

Last question, is there a simple way to change "Read More" link to the whole blog post instead of the line where the more tag is placed?

This archived topic is closed to new replies.