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

Alternating Row Background

Discussion in 'Styling and Customization Questions' started by Dynamic, Apr 1, 2013.

  1. Dynamic

    Dynamic Well-Known Member

    Hey guys,

    I am wondering if there is a way to do this via CSS only if possible. I would like on the node list, and the thread list to have alternating colours for each row. So as opposed to the background all being the same colour, it switches between two colours.

    Thanks.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Templates -> EXTRA.css

    Add this code:

    Code:
    .nodeList li.level_2:nth-child(even) .primaryContent
    {
    	background: red;
    }
    
    .discussionList li.discussionListItem:nth-child(even)
    {
    	background: red;
    }
    
     
    Dynamic likes this.
  3. Dynamic

    Dynamic Well-Known Member

    Awesome dude! Thanks:)
     

Share This Page