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

is there any way to center the avatar in the user info block/avatar holder?

anotheralias

Well-known member
#1
Say you want to make the user info block/avatar 140px wide - the avatar will still align left, leaving a gap of empty space to the right. Is there any way to center it? Thanks!
 

Jake Bunce

XenForo moderator
Staff member
#2
Admin CP -> Appearance -> Templates -> xenforo.css

Code:
    .avatar .img
    {
        display: block;
        background-repeat: no-repeat;
        background-position: 2px 2px;
        text-indent: 1000px;
        overflow: hidden;
        white-space: nowrap;
        word-wrap: normal;
    }
Change to:

Code:
    .avatar .img
    {
        display: block;
        background-repeat: no-repeat;
        background-position: center center;
        text-indent: 1000px;
        overflow: hidden;
        white-space: nowrap;
        word-wrap: normal;
    }
I tested this and it works.
 

Brogan

XenForo moderator
Staff member
#3
Just an observation but if you increase the message template from 124px to 140px, wouldn't you also want to increase the avatar size from 96px to 112px?
 

anotheralias

Well-known member
#4
Thanks so much Jake!

Brogan, if you mean does it -- no. If you mean, I should increase the avatar size - well, I'm still working on the CSS, I'll tackle avatar size another day. (Or more likely, after a few days of getting nowhere I'll beg someone else to tackle it for me.) :D