MyBB Community Forums
Center groupimage at postbit - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: Center groupimage at postbit (/thread-196051.html)



Center groupimage at postbit - Darkrad - 2016-07-24

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?


RE: Center groupimage at postbit - Ashley1 - 2016-07-24

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}


RE: Center groupimage at postbit - Darkrad - 2016-07-24

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?


RE: Center groupimage at postbit - Ashley1 - 2016-07-24

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.


RE: Center groupimage at postbit - Darkrad - 2016-07-25

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 :/


RE: Center groupimage at postbit - Ashley1 - 2016-07-25

Yeah, you have to change the CSS values to suit your installation.