Jump to content

I've searched style.css, but I need help, please


Guest webinator

Recommended Posts

Guest webinator

I have searched the style.css to find where I can change the color of numbers that appear next to the subcategory names in a category, but I give up.

The numbers look like this: (1) or (14), etc. They're in parenthesis and appear next to the text title of a sub category.

If anyone would PLEASE tell me where I can change the font color of these numbers, it would be GREATLY appreciated. Thank you in advance.

Link to comment
Share on other sites

Guest speedbump

That number doesn't have a class associated with it. I don't think you can change it in the viewCat template file either. You could assign a class to it within the include file -or- if you don't mind it being the same as your body text, make sure a font-size and color are assigned in the "body" class.

Sorry so vague but I'm not in front of an installation at this time.

Link to comment
Share on other sites

Guest webinator

That number doesn't have a class associated with it. I don't think you can change it in the viewCat template file either. You could assign a class to it within the include file -or- if you don't mind it being the same as your body text, make sure a font-size and color are assigned in the "body" class.

Sorry so vague but I'm not in front of an installation at this time.

Thanks for the reply. But I don't know how to assign a class, and I don't know what the "body class" looks like.

Can anyone else help me, please?

Link to comment
Share on other sites

I know speedbumb really means well, but what he wrote was incorrect.

Look in the file, skins/xxx/styleTemplates/content/viewCat.tpl

Find a line like this:

<a href="index.php?act=viewCat&amp;catId={TXT_LINK_CATID}" class="txtDefault">{TXT_CATEGORY}</a> ({NO_PRODUCTS})

Remove the </a> within that line, and put it at the end:

<a href="index.php?act=viewCat&amp;catId={TXT_LINK_CATID}" class="txtDefault">{TXT_CATEGORY} ({NO_PRODUCTS})</a>

That simple edit will cause the (x) number to have the same style and color as the category names.

To give the number a different color that is independent of all others, leave the </a> in place anduse this method:

<a href="index.php?act=viewCat&amp;catId={TXT_LINK_CATID}" class="txtDefault">{TXT_CATEGORY}</a> <span style="font-color: red">({NO_PRODUCTS})</span>

Just add the code in red, and change the "color: red" to "color: #404040" or any other color you desire.

Link to comment
Share on other sites

Guest webinator

I know speedbumb really means well, but what he wrote was incorrect.

Look in the file, skins/xxx/styleTemplates/content/viewCat.tpl

Find a line like this:

<a href="index.php?act=viewCat&amp;catId={TXT_LINK_CATID}" class="txtDefault">{TXT_CATEGORY}</a> ({NO_PRODUCTS})

Remove the </a> within that line, and put it at the end:

<a href="index.php?act=viewCat&amp;catId={TXT_LINK_CATID}" class="txtDefault">{TXT_CATEGORY} ({NO_PRODUCTS})</a>

That simple edit will cause the (x) number to have the same style and color as the category names.

To give the number a different color that is independent of all others, leave the </a> in place anduse this method:

<a href="index.php?act=viewCat&amp;catId={TXT_LINK_CATID}" class="txtDefault">{TXT_CATEGORY}</a> <span style="font-color: red">({NO_PRODUCTS})</span>

Just add the code in red, and change the "color: red" to "color: #404040" or any other color you desire.

Thanks so much for your help.

I "Remove(d) the </a> within that line, and put it at the end" and that worked. Thanks.

Then I tried your suggestion "To give the number a different color that is independent of all others" and that made my category box extremely wide and threw all my subcategories out of whack. Are you sure that's the correct code "To give the number a different color that is independent of all others"?

That line already has a </span> on it, does that matter?

I be interested to know if that code is correct, because I checked and double-checked and it doesn't seem to work correctly. As far as I can tell.

Thanks

Link to comment
Share on other sites

  • 3 months later...

You guys are misunderstanding what I meant by "leave the </a> in place"

I gave two different solutions here, they work separately not together.

1. Move the closing anchor tag </a> to the end of the line, this will make the number part of the link and it will be styled just as the cat name because it is now part of the link, because you moved the </a>

2. If you want it to be a different independent color, DO NOT move the </a> tagt. Leave it as it is originally in the file. Instead, use the span code I gave in my post above, and replace the word red with a color name or number of your choosing. Note that all color names do not work, only some, it is best to use a number like #454545;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...