View Full Version : Spacing between Category Columns
shadey
10-24-2005, 01:48 PM
First I will say thanks to anyone that can help me :)
I am trying to space out the columns in the category section. I have edited the the main.css for
<div class="h2">{$cat.TITLE} ({if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL}/{else}index.php?c={$cat.ID}{/if}){if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</div>
{* Display subcategories *}
div.h2 {
font-size: 11pt;
margin: 8px 1px 2px 0px;
padding: 2px;
I can't get it correct .... am I editing the wrong place?
Here is the link http://amateurwrestlinglinks.com/
Thanks again in advance!
otilia
10-29-2005, 11:48 AM
Hey shadey,
seems like you've fixed the problem by now? The categories in your directory seem spaced out enough...
If not, here's the thingie:
- you need to edit the main.tpl file, not the css - look for the table of the categories and increase the cellpadding and cellspacing
{* Categories *}
<table border="0" cellpadding="10" cellspacing="10">
<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>{$cat.TITLE} ({if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL}/{else}index.php?c={$cat.ID}{/if}){if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h2>
- if you need to space out vertically, just add a paragraph tag
in main.tpl, after the code that displays subcategories, like below:
{* Categories *}
<table border="0" cellpadding="10" cellspacing="10">
<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>{$cat.TITLE} ({if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL}/{else}index.php?c={$cat.ID}{/if}){if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h2>
{* Display subcategories *}
<p class="subcats">
{if $cat.SUBCATS}
{foreach from=$cat.SUBCATS item=scat name=scategs}
<a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL}/{$scat.TITLE_URL}/{else}index.php?c={$scat.ID}{/if}">
{$scat.TITLE}</a>, {/foreach} ...
{/if}
</p>
{if ($smarty.foreach.categs.iteration mod $cats_per_col eq 0 and $cats_per_col gt 1) or $smarty.foreach.categs.last}</td>{/if}
<----- HERE
{/foreach}
</tr>
</table>
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.