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

How do I centre all the info/images in the user info to the left of the post

Discussion in 'Styling and Customization Questions' started by Lone Wolf, Oct 11, 2011.

  1. Lone Wolf

    Lone Wolf Well-Known Member

    The title says it all.
     
  2. Shelley

    Shelley Well-Known Member

    Not sure i understand. I'm guessing you want to center the user text in the postbit?

    Code:
    
    .messageUserBlock h3.userText {
     
        text-align: center;
    }
    
     
  3. Lone Wolf

    Lone Wolf Well-Known Member

    No, I've added a user rank image with the following code...

    Code:
    <!-- Start User Ranks -->
    
    <xen:if is="{$user.is_admin}">
    <span class="userrank"><img src="styles/flexile/xenforo/ranks/admin.png"></span>
    </xen:if>
    
    <xen:if is="{xen:helper ismemberof, $user, 2}">
    <span class="userrank"><img src="styles/flexile/xenforo/ranks/member.png"></span>
    </xen:if>
    
    <!-- End User Ranks -->
    ...id like the user rank images and the name/user title to all be centred.
     
    Brendon Meynell likes this.
  4. Shelley

    Shelley Well-Known Member

    you could try the following though i haven't tested it.

    .userrank {
    display: block; margin-left: auto; margin-right: auto;
    }
     
    Lone Wolf likes this.
  5. Lone Wolf

    Lone Wolf Well-Known Member

    That's perfect except I still haven't centred the username/user title
     
  6. Dean

    Dean Well-Known Member

    Thread moved as requested..
     
    Lone Wolf likes this.
  7. Shelley

    Shelley Well-Known Member

    Have you thrown all of the css i posted in both posts in the extra.css template? Try that if you haven't.

    I'm sure brogan will be here early to give you the full working model.
     
  8. Caelum

    Caelum Well-Known Member

    Yeah, not quite sure I getcha. Something like this?
    Code:
    .messageUserBlock{
    text-align:center;
    }
    EDIT: Shelley, you ninja. Fair enough. :p
     
    Lone Wolf likes this.
  9. Shelley

    Shelley Well-Known Member

    go into style properties >> message elements >> author user title and in the additonal css box insert the following:

    Code:
    text-align: center;
    in the same area message elements >> Author username >> additonal css box insert

    Code:
    text-align: center;
    That should center it, the text.
     
    Lone Wolf likes this.
  10. Lone Wolf

    Lone Wolf Well-Known Member

    That did it Shelley, thanks :D
     
  11. Shelley

    Shelley Well-Known Member

    Apologies for the long winded solution I rarely use the style properties when i should. I'm just used to using the extra.css template which is a bad habit i have to get out of. ;)
     
  12. Lone Wolf

    Lone Wolf Well-Known Member

    In the long run, isnt that better as it's easier to deal with style and forum upgrades?
     
  13. Shelley

    Shelley Well-Known Member

    In some cases yes, you won't have to worry about the css you input in the message elements within the style properties when an upgrade comes though so all is good.
     
  14. Brogan

    Brogan XenForo Moderator Staff Member

    Style Properties aren't affected during upgrades either (unless there is a major change, in which case you would need to update EXTRA.css anyway).
     

Share This Page