XF 2.3 Changing username font size globally

TorontoJoe

Member
I got excited when I thought I found the solution here: https://xenforo.com/community/threads/changing-username-size.204308/

But sadly I'm so new to XF that I have no idea where I'd modify these values or exactly what they mean. I'm actually hoping there's a more accessible setting where this can be modified

Here's the issue. I have users with some long-ish names. I think I can change the block width but I'm not sure if that might cause more issues

gfm.webp

Any suggestions friends? I'm really only a few days in with XF so please provide any advice assuming I know nothing
 
Solution
Copy this code and place it the extra.less template:

CSS:
.message-name {
    font-size: .9em;
}

Go to the XenForo Admin control panel, select "Appearance" from the left menu, it will expand, then select "templates". In the "Filter..." search box type in "extra.less" then select that template to open it. It will likely be empty, you will want to copy and paste the code posted above into this template and click "Save" or "Save and exit" the later just closes the template after.

If you want the font-size larger you can increase it. "1.0em" is the default size.

Be aware some members will have extremely long names, so changing the font-size now on a new site really will have little affect once you have a larger member base...
Copy this code and place it the extra.less template:

CSS:
.message-name {
    font-size: .9em;
}

Go to the XenForo Admin control panel, select "Appearance" from the left menu, it will expand, then select "templates". In the "Filter..." search box type in "extra.less" then select that template to open it. It will likely be empty, you will want to copy and paste the code posted above into this template and click "Save" or "Save and exit" the later just closes the template after.

If you want the font-size larger you can increase it. "1.0em" is the default size.

Be aware some members will have extremely long names, so changing the font-size now on a new site really will have little affect once you have a larger member base (numerous names will still expand multiple lines). The default font size is typically a good setting unless you have a specific need for change. That is what the extra.less template is for. All code that goes in there will override the XenForo default code, because it is ran last.
 
Last edited:
Solution
Copy this code and place it the extra.less template:

CSS:
.message-name {
    font-size: .9em;
}

Go to the XenForo Admin control panel, select "Appearance" from the left menu, it will expand, then select "templates". In the "Filter..." search box type in "extra.less" then select that template to open it. It will likely be empty, you will want to copy and paste the code posted above into this template and click "Save" or "Save and exit" the later just closes the template after.

If you want the font-size larger you can increase it. "1.0em" is the default size.

Be aware some members will have extremely long names, so changing the font-size now on a new site really will have little affect once you have a larger member base (numerous names will still expand multiple lines). The default font size is typically a good setting unless you have a specific need for change. That is what the extra.less template is for. All code that goes in there will override the XenForo default code, because it is ran last.


Thank you. It's not empty so I don't want to mess things up. this is what I see there. Should I be replacing this entirely with what you posted? I pasted the code below

less.webp

/*
.p-nav-smallLogo {
display: none;
max-width: 140px;
align-self: center;
}
*/
 
Just insert the code before or after any existing code. Do not over wite any code.

Code:
/*
.p-nav-smallLogo {
display: none;
max-width: 140px;
align-self: center;
}
*/

// *** Change Username Font Size ***
.message-name {
    font-size: .9em;
}

BTW, that existing code is actually commented out by /* code */. That is why it is displayed in BROWN.
 
Last edited:
Clearly, you've been using xf for a while...

I like your site. We're a small-ish but international group of fig growing enthusiasts. figfanatic.com... yeah... we're weird like that. :)

I just broke off with another forum I was admin on for years. Glad to know experienced users like you are out there and willing to assist. If you ever want to grow fig trees... I know some people :)
 
Back
Top Bottom