• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Alternating Node Icon Colours

#1
I need help with my forums (http://159.203.34.248/index.php)
As you see, the colours of the nodes are white and blue, but my goal is blue, and a different shade of blue. Here's the code I've used:
.nodeList li.level_2:nth-child(even) .primaryContent
{
background: #0d98ba;
}
.discussionList li.discussionListItem:nth-child(even)
{
background: yellow;
}

It doesn't seem to change, one just always remains white. Please help.

Thank you,
Gavin
 
#8
I not positive it can be done on the nodes that way, but you probably should also set the colour for the n-child(odd), too.

From the FAQ link in @Brogan 's signature: https://xenforo.com/community/threads/frequently-asked-questions.5183/#post-181037

12. How do I change the background colour of an individual category strip?
Add this to the EXTRA.css template:
Code:
.nodeList .node_x .categoryStrip {
background-color: @primaryLighter;
}
Replace node_x with the actual node ID, for example, node_10. Change the colour to suit.
Edit: I just realised the thread title is asking about node icons, even though the code you posted doesn't touch them.

Something like this should get you in the ballpark.
Code:
.node_x .nodeIcon { options: here; }
 
Last edited:
#9
I not positive it can be done on the nodes that way, but you probably should also set the colour for the n-child(odd), too.

From the FAQ link in @Brogan 's signature: https://xenforo.com/community/threads/frequently-asked-questions.5183/#post-181037



Edit: I just realised the thread title is asking about node icons, even though the code you posted doesn't touch them.

Something like this should get you in the ballpark.
Code:
.node_x .nodeIcon { options: here; }
Actually was my error, I meant the thread list backgrounds.