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

XF 1.1 Centering Avatar

Discussion in 'Styling and Customization Questions' started by Amaury, Sep 26, 2013.

  1. Amaury

    Amaury Well-Known Member

    Just so I don't derail this.

    The postbit user info area at DOTATalk is a bit wider than the default, and now that the info is centered, I want the avatar centered as well.

    How do I accomplish this?

  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    Use chromes inspector or firebug to inspect the avatar. Use the classes attached to it or it's container element and utilize similar CSS as you were given by Paul.
    Amaury likes this.
  3. Amaury

    Amaury Well-Known Member

    Looks like it would be this, though I'm not sure:

    <a data-avatarhtml="true" class="avatar Av10560m" href="members/nights.10560/"><span style="background-image: url('data/avatars/m/10/10560.jpg?1373188674')" class="img m"></span></a>
    However, when I add text-align: center;, nothing happens.
  4. Tracy Perry

    Tracy Perry Well-Known Member

    .messageUserBlock .avatar .img.m  {
    I know that it will work with just the .avatar .img.m, but that would apply everywhere it calls it - I think adding the .messageUserBlock in front will add specificity to it.
    Amaury likes this.
  5. Jeremy

    Jeremy XenForo Moderator Staff Member

    Use the following:
    .messageUserBlock .avatar .img {
      background-position: center;
    Amaury and Tracy Perry like this.
  6. Tracy Perry

    Tracy Perry Well-Known Member

    Time for my coffee :coffee:
    I should know better than to get on the computer immediately upon getting out of bed. :whistle:
    Need a few cups anyway - APC is not playing nicely on one server (users can't register) but on the other (same hardware and OS setup) it works fine. Install xcache on the one APC doesn't work on and it works - install xcache on the one that APC DOES work on and then xenForo complains about xcache not being initialized. ARGGHHH!
    Amaury likes this.
  7. Amaury

    Amaury Well-Known Member

    Hm. This didn't work for some reason.

    This, however, did. I wanted the quick reply avatar centered as well.
  8. KeVo

    KeVo Active Member

    Figured I'd quote you. Where would one place this code at?
  9. Jeremy

    Jeremy XenForo Moderator Staff Member

    KeVo likes this.

Share This Page