Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2007
    Posts
    18
    Plugin Contributions
    0

    Default Strange spaces in categories sidebox

    Anyone know how I can get rid of the spaces that are appearing under each of the categories links and still allow each link to span the entire width and recognize the padding I apply?

    I tried putting width to 100%, 178px and auto on the actual links, the containing div and none of those worked. I then added display: block; to the A.category-top class and it spans the full width and recognizes padding but it adds that annoying space.

    I was thinking it might be the product count (which I turned off in the admin area). Is it possible to remove this from the code with screwing everything up?

    http://img505.imageshack.us/img505/8...refrontmf8.gif

    The yellow color is to show the space issue better

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Strange spaces in categories sidebox

    Can you give an actual link to your site?

    It does sound like there might be an extra space outside the link that is being wrapped down... although it looks like the last category in the list is not getting an extra space, but just the normal inter-box spacing.

  3. #3
    Join Date
    Jun 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: Strange spaces in categories sidebox

    Here is the link to the test site

    http://www.coleyinc.com/zencart/inde...&products_id=1

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Strange spaces in categories sidebox

    I just replicated this on my own site.

    The display: block; has an implied break, so the <br /> at the end of every line adds another one. To remove that, find this section in /includes/templates/your_template/sideboxes/tpl_categories.php
    PHP Code:
          if (SHOW_COUNTS == 'true') {
            if ((
    CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
              
    $content .= CATEGORIES_COUNT_PREFIX $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX;
            }
          }

          
    $content .= '<br />' "\n";
        }
      }

      if (
    SHOW_CATEGORIES_BOX_SPECIALS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true' or SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
    // display a separator between categories and links 
    and remove the '<br />' . from
    $content .= '<br />' . "\n";
    leaving
    $content .= "\n";

    As long as cats are block (or too long for two to fit on one line) you will be fine.

  5. #5
    Join Date
    Jun 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: Strange spaces in categories sidebox

    You Sir, are awesome... and I thank you.


    If you're up to it, how would I need to alter the code in tpl_whats_new.php to get the picture to go below the text and price?

    Again thanks for you help

 

 

Similar Threads

  1. Bold and Spaces in Categories
    By Billyboy in forum Basic Configuration
    Replies: 2
    Last Post: 9 Aug 2009, 06:36 PM
  2. Spaces Between Categories
    By Ptool in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 10 Jul 2009, 06:49 PM
  3. Adding Spaces in Categories in Sidebox
    By jharmon in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 6 Dec 2008, 10:09 PM
  4. adding spaces in categories
    By cheshirenov in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 9 May 2007, 12:55 PM
  5. Leaving spaces between categories in the categories box
    By binny25 in forum Basic Configuration
    Replies: 3
    Last Post: 5 Oct 2006, 05:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg