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

XF 1.5 Is there a way to alternate the background color in thread listing?

#1
Is there a way to alternate the background color in thread listing? For example, I would like every other thread to have a grayish background color instead of all white.. just to break up the solid white. Thanks for any help!
 

Attachments

#3
@Brogan In the Styling FAQ in your signature, you list 17. How can I style alternate posts? Would it not be possible to use similar CSS to style alternate threads? I'm a rank beginner in CSS, so please forgive my awkward attempt. Would something like this be on the right track, or is it required to use template edits?

Code:
.discussionList:nth-child(odd) {
background-color: @primaryLighter;
}

.discussionList:nth-child(even) {
background-color: @primaryLight;
}
 
#5
When I get an idea in my head, it's hard for me to let it go sometimes. ;)

This code works on my test forum. Added to the end of EXTRA.css.

Code:
.discussionListItem:nth-child(odd) {
background-color: @primaryLightest;
}

.discussionListItem:nth-child(even) {
background-color: @primaryLighter;
}
alternatingthreadcolours.jpg