Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Posts
    246
    Plugin Contributions
    0

    Default Help with sub category styling

    Hi

    I am using a custom template and having a hard time trying to change the background color of just the sub categories. I think I need to change the template for the category sidebox in order to add a new class that I can style but after opening the file and playing about with it I am no closer.

    The background should be the full width of the categories sidebox and not interfere with the links which have a hover effect.
    http://goo.gl/Itw11o

    Any help regarding this issue would be most appreciated.
    UK based Zen Cart Web Designer here www.handcoded.co.uk

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

    Default Re: Help with sub category styling

    Your template has custom coding for the categories sidebox which creates a <ul> list, but it is malformed in that it does not account for nested subcategory lists, but puts all top and subcats at the same structural level. Nobody can tell you how to fix this without looking at the actual tpl_categories.php file, but Categories Dressing from Plugins already builds correctly nested <ul> lists with classes and ids to use for styling. You would have to recreate the current hover styling, but it will allow about any refinements you can imagine.

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

    Default Re: Help with sub category styling

    The subcategory links do have a distinct class (.category-products) which you can use to give a distinct background on hover. There are other styles which also affect these items, so you might have to do some additional restyling, but this works to give subcats full-width hover backgrounds:
    mj_template.css
    Code:
    .category-top:hover, .category-links:hover{
    	background:url("../images/topbar-arrow-white.png") no-repeat scroll right center transparent;
    }
    /*after this rule, add a new rule below: */
    
    .category-products:hover{
    	background:url("../images/topbar-arrow-white.png") no-repeat scroll 95% center #ff0000;
    	margin-right:0;
    }

  4. #4
    Join Date
    Jul 2004
    Posts
    246
    Plugin Contributions
    0

    Default Re: Help with sub category styling

    Thanks very much. After looking at your example I came up with this which works perfectly.

    .category-products:link, .category-subs:link{
    background: #f7f7f7;
    margin-right:0;
    }

    .category-products:hover, .category-subs:hover{
    background: #93AF32;
    margin-right:0;
    }
    UK based Zen Cart Web Designer here www.handcoded.co.uk

 

 

Similar Threads

  1. v151 Need some Help with Sub-Sub Category
    By SilverHD in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 25 Apr 2014, 10:52 PM
  2. v139h I need help with styling a selected category.
    By kakapeh in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Feb 2012, 11:18 PM
  3. Help with Category display with sub-categories
    By jonnyh in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 20 Oct 2010, 07:04 AM
  4. Styling sub-category and main product images
    By michaelvincent in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 18 Sep 2006, 08:34 PM
  5. Help with Sub Sub Category (Categories) Layout
    By gorbry in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 19 May 2006, 02:35 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR