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

Rom

Active member
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

  • Untitled.webp
    Untitled.webp
    20.5 KB · Views: 30
@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;
}
 
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.webp
 
Back
Top Bottom