Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2006
    Posts
    52
    Plugin Contributions
    0

    Default Category List Spacing

    Hi

    I'm trying to put some space between the category items in my menu.

    http://www.giftsfromwales.com/shop/i...index&cPath=20

    I've used the following code in the stylesheet:

    A.category-top {
    display:block;
    padding-top:0px;
    padding-bottom:0px;
    margin-top:0px;
    margin-bottom:0px;
    }

    Problem is when I use this code it puts a space in before I even start tweaking! If I turn on the product count this appears on the line underneath!

    Also the space is between the category & sub categories which makes it confusing - probably would have been alright if the space was after the sub-categories!

    Can anybody help?

    Thanks

    Steve
    My Zencarts:
    ---------------------------
    Giftsfromwales

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Category List Spacing

    Adding this to your stylesheet will close up those gaps
    #categories br {line-height:0}
    though not answer why they have appeared in the first place.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

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

    Default Re: Category List Spacing

    Since the default category item is inline display, it needs a <br /> to ensure that it has its own line.

    display:block; makes it a separate line, so there is now duplication of effect.

  4. #4
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Category List Spacing

    Good spot Glenn

    That would also explain why the product counts get pushed onto the next line, since display: block will cause the <a> tags to expand to take up the full width available.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  5. #5
    Join Date
    Feb 2006
    Posts
    52
    Plugin Contributions
    0

    Default Re: Category List Spacing

    Thanks for your help. I removed the block command but now none of the margin or padding code makes any difference - am I missing something?

    A.category-top {

    padding-top:0px;
    padding-bottom:0px;
    margin-top:10px;
    margin-bottom:10px;
    }

    Website now at www.giftsfromwales.com

    Thanks for looking.

    Steve
    My Zencarts:
    ---------------------------
    Giftsfromwales

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

    Default Re: Category List Spacing

    If you disable the category counts and symbols in admin, you can use display: block; just fine with Kuroi's tweak (though you may need to add display: block; to the subcats also).

    The easy answer (for me) is to use Categories Dressing, as that has already set everything necessary and you just need to follow the instructions & examples in the readme to use the stylesheet for full control.

  7. #7
    Join Date
    Feb 2006
    Posts
    52
    Plugin Contributions
    0

    Default Re: Category List Spacing

    Perfect - thanks for all your help!

    Steve
    My Zencarts:
    ---------------------------
    Giftsfromwales

  8. #8
    Join Date
    Aug 2007
    Posts
    1
    Plugin Contributions
    0

    Default Re: Category List Spacing

    This should be a list menu.

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

    Default Re: Category List Spacing

    I have considered that, but need to research whether non-list elements can be displayed between list items. If that does not cause problems, I may try it. Other mods I have seen indicate that it is a problem - though maybe they are just being overcautious.

    Many other mods to tpl_categories.php would also be required, as <li> display would make the existing count display setup malfunction. I would need to set up a whole new method for ensuring that those who want the default style of category name display can do so.

 

 

Similar Threads

  1. change line spacing in category list??
    By lrfowler in forum General Questions
    Replies: 13
    Last Post: 27 Feb 2012, 12:16 AM
  2. Spacing the category submenu list
    By Scott_C in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 28 Jan 2010, 09:49 AM
  3. Spacing on Product List Pages
    By cate_kroft in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 27 Dec 2007, 12:23 AM
  4. Product List - Spacing issue
    By stuffedpretzel in forum Templates, Stylesheets, Page Layout
    Replies: 29
    Last Post: 27 Jun 2007, 08:26 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