Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

categories classes in CSS


stone28

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...