Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Colour categories
Krysm
Posted on 24 May 2010, 18:35:33

Access: Member
Total Posts: 18
Joined: 2010-02-11

Hey,

I was just wondering how I would go about making the {categories} tag a different colour, depending on the catagory selected?

Eg. Sports = green, Music = blue, TV = red etc.

I appreciate any help given :)
#2330
Chris
Posted on 24 May 2010, 18:43:51

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Options > System > News > Delimiter to separate categories when displaying news:

Change this to

Code:
<span class="{cat}">{cat}</span>, 


Including a space at the end. Now when displaying your news the categories will be formatted like so

Code:
<span class="sports">sports</span>, <span class="music">music</span>


Then you can use some CSS to colour each one

Code:
.sports {
color: #FF0000;
}
.music {
color: #FF00FF;
}
#2331
Krysm
Posted on 30 May 2010, 15:36:47

Access: Member
Total Posts: 18
Joined: 2010-02-11

Hi,

I've tried this method exactly as you've said, and it doesn't seem to work :S
#2351
Chris
Posted on 30 May 2010, 18:40:14

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Link me to your site so I can see what the problem is.
#2352
Krysm
Posted on 30 May 2010, 19:35:29

Access: Member
Total Posts: 18
Joined: 2010-02-11

I've PM'd you the link. :]
#2353
Chris
Posted on 30 May 2010, 19:47:47

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Why are you using an iframe? have you tried a php include?

I tested this code and it worked fine

Code:
<style>
.cat_Sports {
    color: #00AA00;
}
.cat_Gaming {
    color: #AA0000;
}
</style>
#2354
Network-13.com © 2013