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

Alternating colors?

Discussion in 'XenForo Pre-Sales Questions' started by reecepy, Apr 27, 2011.

  1. reecepy

    reecepy New Member

    Hi everyone, I'm almost ready to pull the trigger on purchasing XenForo... it seems to be a perfect fit for a new community site I'm rolling out. And I've been really impressed with the community here... everyone seems so friendly and helpful!

    I have one quick question... (please keep in mind I'm a developer, not a designer (working on it!))

    On the forum list, is there a way to alternate the background color of each forum "box". Nothing drastic, just something subtle to make it easier to distinguish the different forums.

    Along with that, within a specific thread, is there a way to alternate the background color of posts? Again, just to help make browsing a thread easier.

    Does this make sense? I apologize if I'm not using the correct terms...

  2. Brogan

    Brogan XenForo Moderator Staff Member

    For the forum list, you could do it with some custom CSS, using the node number in the class, for example: node link level_2 node_5
    It would have to be manually done though.

    For posts though I'm not sure it's possible as the class is the same (excepting staff posts), with only the post id differing.

    When I get a chance I'll do some testing on my local install.
  3. James

    James Well-Known Member

    You could use pseudo classes. Nth-child would work well for this. Something like:
    .node .forum:nth-child(odd){
    background: black;
    .node .forum:nth-child(even){
    background: red;
    (Won't work on its own)

Share This Page