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

XF 1.4 How to center usernames in posts?

Discussion in 'Styling and Customization Questions' started by giorgino, Dec 7, 2014.

  1. giorgino

    giorgino Well-Known Member

    Prior 1.4, I used this template mod to center usernames under the avatar

    Code:
    $0
    
    .messageUserBlock h3.userText {
    text-align:center;
    }
    
    <xen:if is="@enableResponsive">
    @media (max-width:@maxResponsiveNarrowWidth)
    {
       .messageUserBlock h3.userText
       {
         text-align:left;
       }
    }
    </xen:if>
    But now, stop working. What's wrong?

    Schermata 2014-12-07 alle 15.46.40.png
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Try using .messageUserBlock a.username.
     
  3. giorgino

    giorgino Well-Known Member

    Thank you Brogan!

    This is the final working version

    Code:
    $0
    
    .messageUserBlock a.username {
    text-align:center;
    }
    
    .messageUserBlock em.userTitle {
    text-align:center;
    }
    
    <xen:if is="@enableResponsive">
    @media (max-width:@maxResponsiveNarrowWidth)
    {
       .messageUserBlock h3.userText
       {
         text-align:left;
       }
    }
    </xen:if>
    Schermata 2014-12-07 alle 16.23.44.png
     

Share This Page