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

Alternating Row Background

Dynamic

Well-known member
#1
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.
 

Jake Bunce

XenForo moderator
Staff member
#2
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;
}