Search

Changing Username Link Color in XenForo

  • Thread starter LukeLewis
  • Start date
LukeLewis

LukeLewis

Member
Joined
May 7, 2021
Messages
134
Reaction Score
0
Points
21
  • #1
I saw something really cool today that was on a XenForo forum. I don't know how it was done, but certain member username colors were changed across the website. The first instance I noticed was on the main forum list. Some of the usernames were different colors than the majority. Take a look:

xenforo-members-online.gif

And then when I rolled my mouse pointer over one of the names, the pop up avatar had a colored username as well.

xenforo-member-avatar-popup.gif

It was also colored on the thread page.

xenforo-member-avatar-thread.gif

Does anyone know how this was done? Can I customize usernames on my own XenForo forum? How would I go about changing the color, changing the font weight, or both?
 
Newman

Newman

Member
Joined
May 11, 2021
Messages
106
Reaction Score
0
Points
23
  • #2
If you'd like to change the username text color as you specified in your post, you'd need to create a new user group(s) to apply that change to. You wouldn't be able to have different username colors sprinkled throughout the site while everyone is part of the same user group. I don't think that's possible. There would be nothing to differentiate one member from another.

To create a new user group, log into your admin panel and navigate to Groups & Permissions > User Groups. Then, click the Add User Group button in the next page. Once inside the Add User Group page, you'll see a field where you can add custom CSS. That's where you would insert the CSS code that would determine what color the font is going to be and what weight it'll be as well. Take a look:

xenforo-username-css.gif

In my case, I added this code to the Username CSS box:

color: #cc3333; font-weight: 700;

That will change the font color to a red and make the weight a bit heavier. You may add whatever style you wish. Once done, click the Save button at the bottom of the page and you should be all set.

PS - To test this out, after adding the user group and customizing the member text color, be sure to add a user to the group. You should see the change then.
 
Top