This is my stylesheet after doing some cleaning:
/**
- CSS Stylesheet for Categories Dressing examples
- @copyright Copyright 2010 Glenn Herbert
- @copyright Portions Copyright 2003-2006 Zen Cart Development Team
- @copyright Portions Copyright 2003 osCommerce
- @license http://www.gnu.org/licenses/ GNU Public License V3.0
- /includes/templates/your_template/css/stylesheet_chcategories_dressing.css
- Categories Dressing by Glenn Herbert (gjh42) - 20100922
- Alternate version for use with Uncollapsed Categories Tree mod
/
/
/IE6 hacks/
- html #chcategories li, * html #chcategories li a {
height: 1em;/fix IE6 whitespace bug/
background-image: url(../images/pixel_trans.gif);/partially fix IE6 a block display bug/
}
#chcategories ul {/top category lists/
padding: 0px;
margin: 0px;
width: 150px;
background-color: #F0E68C;
position: relative;
left: 18px;
list-style: none;
}
#chcategories ul a {/top categories/
display: block;
line-height: 42px;
text-decoration: none;
color: #fff;
text-align: center;
padding: 1px;
font-size: 13px;
font-weight: bold;
margin-bottom: 2px; /* change this to put space between buttons*/
border: 1px solid #aabbcc;
position: relative;
height: 42px;
/* border: 1px solid #5E6977; */
border-radius: 5px 5px 5px 5px;
background-color: #19283D;
}
#chcategories ul ul {/subcategory lists/
list-style: none;
border-radius: 5px 5px 5px 5px;
background-color: #4B586F;
margin-bottom: 1px;
}
#chcategories ul ul a {/subcategories/
display: block;
list-style: none;
background: #4B586F;
}
#chcategories li a.cat-parent {
list-style: none;
margin-bottom: 1px; /* change this to put space between buttons*/
border-bottom: 1px solid #F0E68C;
position: relative;
height: 42px;
/* border: 1px solid #5E6977; */
border-radius: 5px 5px 5px 5px;
background-color: #19283D;
}
/* top category hover effects*/
#chcategories li.cat-top a:hover {
z-index: 1000;
background-color: #142031;
}
/* subcategory hover effects*/
#chcategories li li.cat-subs a:hover, #chcategories li li.cat-products a:hover {
z-index: 1000;
background-color: #142031;
}
/individual page rules go after the general rules/
/example for individual category as bg image/
#catGroup4 li a {background-image: url("../images/bulbut.png");
background-repeat:no-repeat; background-position:left center;
background-color: #000000;
border: 1px solid #8B0000;
}
#chcategories li.cat-special_style2 a{
padding-left: 30px;
}
#chcategories li.cat-special_style1 a{
}
#catGroup4 li a:hover {
background-color: #610000;
}
#catGroup4 li li.cat-subs a, #catGroup4 li li.cat-products a {
z-index: 1000;
background-color: #222222;
padding: 0;
}
#catGroup4 li li.cat-subs a:hover, #catGroup4 li li.cat-products a:hover {
background-color: #610000;
}
#chcategories li>ul {display: none;}
#chcategories li:hover {position: relative;}
#chcategories li:hover>ul {
display: block;
position: absolute;
left: 100%;
top: 0;
background: #000000;
border: 1px solid #000000;
z-index: 100;
width: 98%;}
The width problems seem to be solved!
I deleted all the special style defines, but added two more again. I defined a special style to the category for which I wanted to push the lettering to the right off of the image. I thought doing so would allow only that category to have the padding in effect.
After I defined a style for that category (that category being Flame Resistant), the hover color showed up like I wanted it to when previously it had been the same color as my other categories (even though I added this in CSS: *#catGroup4 li a:hover {
background-color: #610000;
}. * )
Seeing this, I also added a special style for the FR Fabrics category. It also didn't have the red background color displaying when hovering. Instead, it had the blue background color that my other categories have. Adding this to my stylesheet,
#chcategories li.cat-special_style1 a{
} made the red background show up even though I didn't define a color for this style.
I don't know much about CSS, I'm confused as to how that could work. I haven't cleaned up my stylesheet as well as I could yet, perhaps?
This isn't too big of a deal, but I'm also wondering how to add the hover effect for the All Products tab.
What do you think?