Apply user group text colour to underline on hover

Apply user group text colour to underline on hover

Paul B

XenForo moderator
Staff member
Brogan submitted a new resource:

Apply user group text colour to underline on hover - Let's draw a line under this problem

If you have applied user name CSS to your user groups to change the text colour, you may have noticed that when hovering, the underline colour is the same as the default hyperlink colour.

This therefore is a very simple tip to ensure the styling is applied to the underline.

Simply add this to EXTRA.css:

Code:
a.username:hover > span {
text-decoration: underline;
}

Read more about this resource...
 
This simple tweak really helps out a lot. It even works with the Featured Threads Add-on.

ajnner.png


Thanks a lot for this!
 
I've been using this code a for a long time, and it works great, but I just noticed it doesn't seem to work on banned members:

Test.webp
 
It works for me.
It could be a conflict with your style or other changes.

Yes, it appears so. It works properly on the default style.

And I just found the issue while typing this reply. This was in the EXTRA.css template below your code:

Code:
/* Username Styles */

.username .banned {
    text-decoration: none !important;
}

/* Username Styles */

Not sure who added it, but removing it fixed the issue.
 
Oh, derp. It was me. I added it to remove the strike-through banned members had.

I'll post in the appropriate forum to figure out how to remove the strike-through without affecting the underline for banned members.
 
Ran into another roadblock. Does this not extend to signatures because of the different structure (I would guess)? Tried on the default style with the only customization being your CSS code:

Signature 1.webp

Also happens with signatures on profiles under Information and on posts.

Thanks in advance. :)
 
Back
Top Bottom