MyBB Community Forums

Full Version: Post Bit Center Align
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi everyone, I have just changed the postbit information on my forum to classic view and it is left aligned like this
[Image: 2218aa2d9f.png]

and I would like it to be centered like this:
[Image: 5cfb1386ca.jpg]

I'm using MyBB Version 1.6.11, and here's my current code:
{$ignore_bit}
<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
	<tbody>
		<tr>
			<td class="tcat">
				<div class="float_left smalltext">
					{$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>
				</div>
				{$post['posturl']}
			</td>
		</tr>

		<tr>
			<td class="trow1 {$unapproved_shade}">
				<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
					<tr>
						<td class="post_avatar" width="1" style="{$post['avatar_padding']}">
							{$post['useravatar']}
						</td>
						<td class="post_author">
							<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
							<span class="smalltext">
								{$post['usertitle']}<br />
								{$post['userstars']}
								{$post['groupimage']}
							</span>
						</td>
						<td class="smalltext post_author_info" width="165">
							{$post['user_details']}
						</td>
					</tr>
				</table>
			</td>
		</tr>

		<tr>
			<td class="trow2 post_content {$unapproved_shade}">
				<span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>

				<div class="post_body" id="pid_{$post['pid']}">
					{$post['message']}
				</div>
				{$post['attachments']}
				{$post['signature']}

				<div class="post_meta" id="post_meta_{$post['pid']}">
				{$post['iplogged']}
				</div>
			</td>
		</tr>

		<tr>
			<td class="trow1 post_buttons {$unapproved_shade}">
				<div class="author_buttons float_left">
					{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}
				</div>
				<div class="post_management_buttons float_right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
				</div>
			</td>
		</tr>{$post['postrep_inline']}
	</tbody>
</table>{$post['postrep_outline']}

Can somebody please help, and sorry for the silly question, I'm relatively new to MyBB Toungue
you can try adding below style property at the bottom of global.css (advanced edit mode)
.post_author {text-align: center!important;}
hard refresh your browser (eg. press CTRL + F5) on a topic page after saving changes to global.css
I can't find global.css, only global.php

Also the text appears to be centered but the position is slightly off, is there any way to change the position of the boxes and text within them to the right so that they are center-aligned with thename of the user?
^ in general, MyBB forum's templates and themes should be modified through admin panel

admin panel >> themes (left side menu) >> click on your theme >> global.css >> edit in advanced mode (tab)
try the suggested code and post back
Like this?
[Image: 4Sooc.png]

Nothing changed :\
I'm having the same problem but I already have that line at the bottom of global.ccs.

Is there a way to edit the position of the post bit blocks? They seem to be separate elements:

[Image: 52c033680d.png]
we need your forum URL to check (assuming that you both have classic postbit layout set for all & guests can view threads)
(2013-10-17, 05:50 PM).m. Wrote: [ -> ]we need your forum URL to check (assuming that you both have classic postbit layout set for all & guests can view threads)

The forum I am using at the moment is under construction and I cannot make it available to guests just yet as it contains some private information that will be removed when the site is properly launched.

Is there anything I can check and report back to you? Sorry about this inconvenience.
^ @Winky, this might work for your forum --> .auth_block {text-align: center!important;}
(2013-10-17, 06:05 PM).m. Wrote: [ -> ]^ @Winky, this might work for your forum --> .auth_block {text-align: center!important;}

Ah it didn't quite work. Nothing changed so I tried putting "right" instead of "center" and all the writing moved to the right but the boxes themselves stayed where they are, like this:

[Image: ed4c8d723d.png]

I guess this means since the text was initially centered it did not affect the blocks around them or their position inside the block.

I think moving the position of the blocks themselves might require a more in-depth look into the template files themselves. I have also tried removing the ".post_author {text-align: center!important;}" line and using the one you recommended on it's own but it did not seem to change anything. I appreciate you effort for now despite not being able to visit the site yourself, but since I live in Australia I will have to check this thread again tomorrow for other suggestions. Thanks for your help Smile
Pages: 1 2