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

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;
}
 

Lone Wolf

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;
}
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.
 

Shelley

Well-known member
yes and I've also 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.
you could try the following though i haven't tested it.

.userrank {
display: block; margin-left: auto; margin-right: auto;
}
 

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.
 

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

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. ;)
In the long run, isnt that better as it's easier to deal with style and forum upgrades?
 

Shelley

Well-known member
In the long run, isnt that better as it's easier to deal with style and forum upgrades?
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.
 

Brogan

XenForo moderator
Staff member
In the long run, isnt that better as it's easier to deal with style and forum upgrades?
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).
 
Top