• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Get usernames to display in entirety?

#1
I have an add-on which shows when a user is offline or online, but as you can see in the attached picture, alot of usernames are being cut off and sent to the next line. I would prefer the username is just a little lower, so it displays across the entire area under the offline badge. Could anyone help with this?
 

Attachments

Tracy Perry

Well-known member
#2
I have an add-on which shows when a user is offline or online, but as you can see in the attached picture, alot of usernames are being cut off and sent to the next line. I would prefer the username is just a little lower, so it displays across the entire area under the offline badge. Could anyone help with this?
You will have to play with the following code
Code:
.messageUserInfo {
width: 124px;
}
and edit the width to fit (or adjust the font size for the names). By using the related code you will also have to style the rest of the message area so that it does not overlap.
The other option is limit the number of characters in a user name.
 

James

Well-known member
#3
The alternative may be to bring the online indicator up a few pixels so it doesn't interfere.

Judging by Tracy's code (I'm on mobile) the block is fixed anyway, meaning usernames over a certain length will automatically wrap (rather than increase the width of the message user info block).
 

Tracy Perry

Well-known member
#4
The alternative may be to bring the online indicator up a few pixels so it doesn't interfere.

Judging by Tracy's code (I'm on mobile) the block is fixed anyway, meaning usernames over a certain length will automatically wrap (rather than increase the width of the message user info block).
Yeah, the add-on doesn't really impact the username sector. It's related to the width of the .messageUserInfo block. I think it defaults to 124px (at least that's what it is on my site and my test forum using modified default styles).
 
#6
That seemed to just make the message user info area wider. I would like it to not wrap when it hits the online badge instead just continue.
 

EQnoble

Well-known member
#8
What addon is this for?
Without knowing that I would just suggest putting this in EXTRA.css
Code:
span.UserOnline, span.UserOffline {
    margin: -8px -5px -8px 5px;
}
.messageUserBlock .userText a.username {
    margin-top: 3px;
}
Will look like this for example:
this.png
 

Tracy Perry

Well-known member
#9
I've found using the default style layout, about 15 characters in the username are the max you can have. Any more than that (without adjusting the block size or font size of the username) and the name wraps to a second line no matter whether that add-on was used or not.