Changing colours in categories.tpl
Hi all,
My client wants each category name to have a different colour, as her logo is also multicoloured. I've traced the file that generates the list to categories.tpl, but simply taking out the font/class statements doesn't work as the list is generated on the fly rather than being html. I know I can change this easily in the static html pages, but can anyone come up with a way to make each category heading in the category list have a different colour in the dynamic pages? Cheers Dave |
This could be done as follows:
code for categories.tpl: Code:
{* $Id: categories.tpl,v 1.19 2003/11/11 14:02:32 svowl Exp $ *} This will then say for each category item it will look for a style in the style sheet of CategoriesList123 or whatever the category id is. Then simply create a style sheet class for each category id as follows: .CategoriesList1{ FONT-SIZE: 12px; COLOR: #330000; } .CategoriesList2{ FONT-SIZE: 12px; COLOR: #FF9900; } .CategoriesList3{ FONT-SIZE: 12px; COLOR: #FF3300; } etc etc etc ............. hth |
Thanks Funkydunk :D
I'll give it a go later tonight Cheers Dave |
Hi Funkydunk
I've done the mods as you suggested, but it doesn't show the colours. I know it is picking up the right details, because if I change the font-size on one of the categories for example it shows the changes. This is copied from the page source code Quote:
It seems that the link elements in the CSS file are overring the colours, but I've no idea how to stop this happening. Do you have any further ideas? Cheers Dave |
Sorry - I corrected my post because of that problem.
|
Perfect! :D :D
Thanks Dave |
:D Nice one FunkyDunk!
If possible please move to the "Custom Mods" area of the forum. That way it'll be an easy find in the future. Thanks, Glen |
All times are GMT -8. The time now is 01:27 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.