MyBB Community Forums

Full Version: Center groupimage at postbit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello

When I add groupimage to my usergroups it looks like 1st one, looks terrible. I think it would look better (still not sure) as 2nd one.

[Image: z4bW9j.jpg]

I assume this is the code I should be changing :

<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
<div class="post {$unapproved_shade}" style="{$post_visibility}" id="post_{$post['pid']}">
<div class="post_author">
	{$post['useravatar']}
	<div class="author_information">
			<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
			<span class="smalltext">
				{$post['usertitle']}<br />
				{$post['groupimage']}
			</span>
	</div>
	<div class="author_statistics">
		{$post['user_details']}
	</div>
</div>

How can I center only groupimage here?
groupimage is to be found in a few templates, the one you're showing is for postbit template.

Edit: Sorry, nevermind I see you did post the postbit templateĀ  Sleepy

You can play around with CSS:

<span class="test">{$post['groupimage']}</span>

then add to global.css

.testĀ {margin-left:300px; position:absolute}
Sadly I cant give pixels since my forum has 2 width options (one is 960px other one is always %90 of page)

Theres no way to code it to be center I wonder?
You can give margins in % - this works on the big screen

.test {margin-left:30%; margin-top: -5%; position:absolute}

don't know how it will look on the smaller screens.

Don't think you will get it exactly centre with html alone because there are 2 divs on that row.
It looked like this Big Grin

[Image: bbmj7G.jpg]

In wider mode it looks like this

[Image: dbmog7.jpg]

It seems I can make those 2 width options seperate themes and define different values to make it look centered but I am not sure I would go that way. I'll see.

%30 %-5 looked even more off btw. %20 and %-2.3 looks good but not in wider mode :/
Yeah, you have to change the CSS values to suit your installation.