Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Removing Space Between Categories

Removing Space Between Categories

Views: 940

Results 1 to 3 of 3
7 Jan 2011, 5:26 PM
#1
compuweb avatar

compuweb

New Zenner

Join Date:
Aug 2009
Location:
Limerick, Ireland
Posts:
91
Plugin Contributions:
0

Removing Space Between Categories

Hello All,

I cannot seem to remove the space that currently exists between my categories on the left sidebox. There is a space of about 18px between the "bottom-border" of each category and the next category.

I would like to remove this space entirely if possible but I have tried and failed.

http://www.idostationery.ie/index.php?main_page=index

Any help would be much appreciated.

7 Jan 2011, 5:48 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Removing Space Between Categories

That space is from the <br /> that is inserted between category items to make sure they stay on different lines. The stock categories are only <a> links displayed inline, and they need the breaks. Since you have made them display: block;, the breaks are superfluous.

You can either use Categories Dressing which takes care of this and many other things (probably overkill for your current needs), or you can edit /includes/templates/your_template/sideboxes/tpl_categories.php and remove the code that adds the <br /> after each category is built.
You could also add to your stylesheet

#categoriesContent br {display: none;}

7 Jan 2011, 8:43 PM
#3
compuweb avatar

compuweb

New Zenner

Join Date:
Aug 2009
Location:
Limerick, Ireland
Posts:
91
Plugin Contributions:
0

Re: Removing Space Between Categories

Thank you gjh42,

You answer was very thorough, thank you so much. You were correct about the "display:block".

I added "#categoriesContent br {display: none;}" to the stylesheet as you suggested. That worked perfectly for the categories. It also removed the linebreak between the sub-categories so I added "display:block" to "category-products" in my stylesheet and now all is working as I wanted.

Thank you so much for your help.