I just found a couple bugs in the tpl_categories.php while trying to install and modify ch_category bundled with categories dressing... using ZenCart 1.3.9h
includes/templates/YOUR_TEMPLATE/sideboxes/tpl_categories.php
1 - You will want to **add **this line:
$content .= "\n" . '<ul style="margin: 0; padding: 0; list-style-type: none;">' . "\n";
**below **this line (18):
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
2 - You will then need to **add **a <li> in front of the <div class= around line (41) to make it look like this:
$content .= '**<li>**<div class="betterCategories"><a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
3 - Then find this line (60):
$content .= '<br />' . "\n";
and replace it with this line:
$content .= '</div></li>' . "\n";
that will close the div container and close the li.
4 - Finally add this line:
** $content .= '</ul>' . "\n";**
**
above** this line:
$content .= '</div>';
at the end of the file around line (96).
This will close the ul and keep the whole category box contained properly.
I am aware that the stock tpl_categories.php doesn't wrap each link with a div (notice 'betterCategories' has been added to my links) but once you do, you can further control each link!
Side note about line numbers: Line breaks have been removed from my stock tpl_categories.php remove the empty space in your file and line numbers will match.
Twitch.