1. 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

Discussion in 'Styling and Customization Questions' started by Vasdev, Mar 26, 2016.

  1. Vasdev

    Vasdev New Member

    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
     
  2. RamzanHD

    RamzanHD Active Member

    Wait a minute why is your site an IP address
     
  3. Vasdev

    Vasdev New Member

    Just a test site.
     
  4. RamzanHD

    RamzanHD Active Member

    With demo you can't really do everything if I was you I would get licence
     
  5. Vasdev

    Vasdev New Member

    It's not a demo haha
     
  6. RamzanHD

    RamzanHD Active Member

    Wtf then what js it lol I was wondering how can this guy install a style in demo . Lol I'm so dumb
     
  7. Vasdev

    Vasdev New Member

    Do you know how I can fix this?
     
  8. Matthew S

    Matthew S Member

    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; }
     
    Last edited: Mar 26, 2016
  9. Vasdev

    Vasdev New Member

    Actually was my error, I meant the thread list backgrounds.
     
  10. Vasdev

    Vasdev New Member

  11. Matthew S

    Matthew S Member

  12. Vasdev

    Vasdev New Member

  13. Matthew S

    Matthew S Member

    Cool. Care to share your solution so others can do the same? :)
     
  14. Vasdev

    Vasdev New Member

    Sure!
    Use this:
    .nodeList li.level_2:nth-child(even) .primaryContent
    {
    background: (putcolourhere);
    }
    .nodeList li.level_2:nth-child(odd) .primaryContent
    {
    background: (putcolourhere);
    }

    But now I have one more question, how can I make this whole background blue, rather than white and blue?
    https://gyazo.com/09b1e0d7f0db0be21255c85ab3ceb377
     

Share This Page