stone28 Posted May 15, 2007 Share Posted May 15, 2007 Hi, I want to customise categories menu (background images, etc.) but to do that I need to add different CSS classes to my categories and subCategories so I can differentiate them in my CSS. As far as I can see in categories.php there is one php code to generate both of them the only difference is that all subcategories have white space in front of them. As I am not php programmer I have no idea how to change that code to attaché to them different classes. I’ve just added this: Line: 20 (around) $categories_string .= '<a class="catMenu" href="'; But obviously it will add class to both: main categories and subcategories. I can see also in line 17: $categories_string .= " "; Which is probably added in front of all subcategories to make them indent. Please, can somebody help me with that problem? I believe for some of you guys is just 5 minutes or even less. Really appreciate all your help and thanks in advance. Stone28 Link to comment Share on other sites More sharing options...
sugiartha Posted May 16, 2007 Share Posted May 16, 2007 hope this works (line 20): $categories_string .= '<a class="' . ( (sizeof($tree[$counter]['level'])) ? 'subcatMenu' : 'catMenu') . '" href="'; Sugiartha ------------------------------------------ concept of life: enjoy aja! Link to comment Share on other sites More sharing options...
stone28 Posted May 18, 2007 Author Share Posted May 18, 2007 Thank you very much! I've already solved that problem in some other way, however yours look much neater ;-) Stone28 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.