MyBB Community Forums

Full Version: Sidebar issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey all,
Having a small problem which I can't figure out.. 

I am trying to put a bracket/space between the Board stats and the Lastest posts and it's not doing it correctly it's putting a bracket/space above the table.

Here's the code below,

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder border_table" style="clear: both;">
<tr>
<td class="thead_sidebox" colspan="2">

Board stats

</td>
</tr>
<tr>
<td class="trow2">

{$forumstats}

</td>
</tr>
</div>
	<script type="text/javascript">
	jQuery(function(){
		jQuery(".latestthreads").load("{$mybb->settings['bburl']}/portal.php .latestthreads_portal");
	});
	</script>
	<tr>
<td class="thead_sidebox" colspan="2">

Latest Posts

</td>
</tr>
<tr>
<td class="trow2">

<div class="latestthreads float_left"></div>

</td>
</tr>
</table>
</div>

Image of what I mean..

[Image: MVBNcaD.png]

Top white line is were it's doing the spacing, I want the spacing to be at the bottom so there not stuck together. Wink
Thanks.
Try: (Adjust the 100px as required)

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder border_table" style="clear: both;">
<tr>
<td class="thead_sidebox" colspan="2">

Board stats

</td>
</tr>
<tr>
<td class="trow2">

{$forumstats}

</td>
</tr>
<tr>
  <td colspan="2" style="height:100px;"></td>
</tr>
</div>
    <script type="text/javascript">
    jQuery(function(){
        jQuery(".latestthreads").load("{$mybb->settings['bburl']}/portal.php .latestthreads_portal");
    });
    </script>
    <tr>
<td class="thead_sidebox" colspan="2">

Latest Posts

</td>
</tr>
<tr>
<td class="trow2">

<div class="latestthreads float_left"></div>

</td>
</tr>
</table>
</div>
at the end of closing table ie: </table>
after that add <br/>
This method will work. I use it on my own templates.
Quote:<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder border_table" style="clear: both;">
<tr>
<td class="thead_sidebox" colspan="2">

Board stats

</td>
</tr>
<tr>
<td class="trow2">

{$forumstats}

</td>
</tr>
</div>
    <script type="text/javascript">
    jQuery(function(){
        jQuery(".latestthreads").load("{$mybb->settings['bburl']}/portal.php .latestthreads_portal");
    });
    </script>
    <tr style="height: 15px;"></tr>
    <tr>
<td class="thead_sidebox" colspan="2">

Latest Posts

</td>
</tr>
<tr>
<td class="trow2">

<div class="latestthreads float_left"></div>

</td>
</tr>
</table>
</div>
You have 2 </div> tags there but I cannot see the starter <div> tag for both of them.
Quote:<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder border_table" style="clear: both;">
<tr>
<td class="thead_sidebox" colspan="2">

Board stats

</td>
</tr>
<tr>
<td class="trow2">

{$forumstats}

</td>
</tr>
<tr>
 <td colspan="2" style="height:100px;"></td>
</tr>
</div>
   <script type="text/javascript">
   jQuery(function(){
       jQuery(".latestthreads").load("{$mybb->settings['bburl']}/portal.php .latestthreads_portal");
   });
   </script>
   <tr>
<td class="thead_sidebox" colspan="2">

Latest Posts

</td>
</tr>
<tr>
<td class="trow2">

<div class="latestthreads float_left"></div>

</td>
</tr>
</table>
</div>

Also, you can make one table for each sidebar, or even drop the tables and use divs.
(2015-12-20, 05:14 PM)eNvy Wrote: [ -> ]You have 2 </div> tags there but I cannot see the starter <div> tag for both of them.
Quote:<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder border_table" style="clear: both;">
<tr>
<td class="thead_sidebox" colspan="2">

Board stats

</td>
</tr>
<tr>
<td class="trow2">

{$forumstats}

</td>
</tr>
<tr>
 <td colspan="2" style="height:100px;"></td>
</tr>
</div>
   <script type="text/javascript">
   jQuery(function(){
       jQuery(".latestthreads").load("{$mybb->settings['bburl']}/portal.php .latestthreads_portal");
   });
   </script>
   <tr>
<td class="thead_sidebox" colspan="2">

Latest Posts

</td>
</tr>
<tr>
<td class="trow2">

<div class="latestthreads float_left"></div>

</td>
</tr>
</table>
</div>

Also, you can make one table for each sidebar, or even drop the tables and use divs.

Good eye. Combine what eNvy and I wrote and you should have no problems.