MyBB Community Forums

Full Version: Custom profile field in classic post bit.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In mypost bit i display a custom profile field that can be quite long, and as such it is overspilling in to the main post area, this is in clasic postbit mode in normal mode as the postbit goes across its fine.
I tried setting a max-width and also containing it in a div, nothing seems to work, here is a picture of the problem.
[attachment=26259]

I want the text to remain in the grey area here is the posbit classic template
{$ignore_bit}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
	<tr>
		<td class="post_author" width="150px" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
		<div style="width:150px; "><strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
		<span class="smalltext">
			{$post['usertitle']}<br />
			{$post['userstars']}
			{$post['groupimage']}
                        <div style="max-width:145px; ">
                         Labrador Details: <br/>{$post['fid4']}
                        </div>
			{$post['useravatar']}<br />
			{$post['user_details']}</div>
		</span>
	</td>
	<td class="{$altbg}" valign="top">
		<table width="100%">
			<tr><td>{$post['posturl']}<span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>
			<br />
			<div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">
				{$post['message']}
			</div>
			{$post['attachments']}
			{$post['signature']}
			<div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
				<div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
				{$post['iplogged']}
			</div>
		</td></tr>
	</table>
</td>
</tr>
<tr>
	<td class="post_author" style="white-space: nowrap; text-align: center; vertical-align: middle;"><span class="smalltext">{$post['postdate']} {$post['posttime']}</span></td>
	<td class="{$altbg}" style="vertical-align: middle;">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr valign="bottom">
				<td align="left" ><span class="smalltext">{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}</span></td>
				<td align="right">{$post['button_tyl']}{$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']}</td>
			</tr>
		</table>
	</td>
</tr>
<tr style="{$post['tyl_display']}" id="tyl_{$post['pid']}">
	{$post['thankyoulike_data']}
</tr>
</table>
Try changing the css style of the text in the grey area to this:

 {$post['groupimage']}
                         <div style="white-space:pre-line;">
                          Labrador Details: <br/>{$post['fid4']}
                         </div>
             {$post['useravatar']}<br />


Excellent, that fixed it, thanks marked as solved and rep added.