Hi. :-) I'm relatively new to PHP/CSS although I'm figuring it out by trial and error. Uh, mostly error...

The problem is that there is a big gap between my CATEGORIES and SUBCATEGORIES on the front page of my directory. I'm guessing the culprit is this line:

<p class="subcats">

which starts a new paragraph. This is the code on the main.tpl page:

{* Categories *}
{if !empty($categs)}
   {if !empty($category.ID)}
      <h3>{l}Categories{/l}</h3>
   {/if}

   <table border="0" cellpadding="0" cellspacing="2">
   <tr>
      {foreach from=$categs item=cat name=categs}
      {if ($smarty.foreach.categs.iteration mod $cats_per_col eq 1 

and $cats_per_col gt 1) or $smarty.foreach.categs.first}<td>{/if}
      <h2><a href="{$smarty.const.DOC_ROOT}/{$cat.CACHE_URL|escape}" 

title="{$cat.TITLE|escape}">{$cat.TITLE|escape}</a>{if 

$smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>

{/if}</h2>
      {* Display subcategories *}
      {if !empty($cat.SUBCATS)} 
      <p class="subcats">
         {foreach from=$cat.SUBCATS item=scat name=scategs}
            <a href="{$smarty.const.DOC_ROOT}/

{$scat.CACHE_URL|escape}">
            {$scat.TITLE|escape}</a>, {/foreach}..
      </p>
      {/if}
      {if ($smarty.foreach.categs.iteration mod $cats_per_col eq 0 

and $cats_per_col gt 1) or $smarty.foreach.categs.last}</td>{/if}
      {/foreach}
   </tr>
   </table>

Does anyone know how to change this?

Wow, what's with all the {}'s and the .tpl file? is there something about PHP that I'm missing? I haven't come across anything that looks like that before.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.