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

How to center username and group title

Discussion in 'XenForo Questions and Support' started by Andy.N, Feb 21, 2011.

  1. Andy.N

    Andy.N Well-Known Member

    Under the user info block on the left of postbit
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Add this to EXTRA.css
    .messageUserBlock h3.userText {
    text-align: center;

    Or you can do it in Style Properties -> Message Layout -> User Info Block and add text-align: center; to the Miscellaneous field.
    jr777, nvthanh1994 and Andy.N like this.
  3. majesty95

    majesty95 Active Member

    I did this and it only centers the user title, not the username. How can I do both?
  4. Jeremy

    Jeremy Well-Known Member

    .messageUserBlock h3.userText, .messageUserBlock a.username {
      text-align: center;
  5. Amaury

    Amaury Well-Known Member

    @majesty95, you can actually do this with a style property: Style Properties > Message Layout > User Text Block

    Put in text-align: center; in the large miscellaneous field.
  6. majesty95

    majesty95 Active Member

    I tried that and it din't work. However, I was able to get it to work with a method similar to @Jeremy
  7. Amaury

    Amaury Well-Known Member

    Style Properties > Message Elements > Author User Name and Author User Title

    Remove the display: block; and it'll work.
    bottiger likes this.
  8. majesty95

    majesty95 Active Member

    Have another question. How do a set a parameter for how wide this bar will be? It looks fine on the sidebar but everywhere else it is stretched...

    User title.png

    Lastly, I have the premium user group set to allow a custom user title. But if a mod has premium access, the mod bad gets overridden by the custom user title. How can I fix that as well?

Share This Page