1. 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?

Discussion in 'XenForo Questions and Support' started by anotheralias, Oct 12, 2010.

  1. anotheralias

    anotheralias Well-Known Member

    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!
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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.
     
    anotheralias likes this.
  3. Brogan

    Brogan XenForo Moderator Staff Member

    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?
     
  4. anotheralias

    anotheralias Well-Known Member

    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
     
    Brogan likes this.

Share This Page