View Full Version : How do you class out the category links
phil2564
10-12-2005, 11:49 PM
:?: I am having a problem classing out the category links and sub category links. Do you do it on the main.css ? If so which ones are the category and sub categories. Do you work the classing like usual classing. Any example code would be helpful.
Thanks
Phil
Ap0s7le
10-13-2005, 01:42 AM
Hello Phil, glad you're coming to ask this question.
Best way to learn would be to look at your directory, take a Category and copy the name. View the source, find it and see what it's wrapped with. And do the same for the Sub Cats.
I can give you the solution, but if I do that doesn't actually teach you anything.
"Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for a lifetime"
Know what I mean? Get stumped, IM me and we'll talk.
-Casey
phil2564
10-13-2005, 09:47 AM
Actually I am quite good with classing but what I did and I don't know if you are going to say I did it wrong or not. But this is what I did.
For the Categories.
I went to templates main.tpl and changed this line.
<h2><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL}/{else}index.php?c={$cat.ID}{/if}" >
TO THIS
<a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL}/{else}index.php?c={$cat.ID}{/if}" class="cathead">
I made a class called "cathead"
Then I went to the Main directory and opened the main.css and added in
a.cathead:link {
font-family: sans-serif;font-size: small;color: #333333;text-decoration: none;}
Then loaded them back up and it working.
Was that the way you would have done it?
Phil
Hi,
I think you could edit the H2 part in main.css to get the same result.
:)
Ap0s7le
10-13-2005, 05:05 PM
Hi Phil, really in the end if it works then who cares how I'd do it ;)
Best of luck always :)
-Casey
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.