# Category List Alternating Colors?

**URL:** https://meta.discourse.org/t/category-list-alternating-colors/110524
**Category:** Support
**Created:** [March 2, 2019, 8:26pm UTC](https://meta.discourse.org/t/category-list-alternating-colors/110524 "2019-03-02T20:26:39Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![cz1](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@cz1](https://meta.discourse.org/u/cz1)
#### Post date: [March 2, 2019, 8:26pm UTC](https://meta.discourse.org/t/category-list-alternating-colors/110524/1 "2019-03-02T20:26:39Z")

</div>

I can’t seem to find the correct CSS code to make the categories alternate colors. I have it working properly for my topic list.

> .topic-list-item:nth-child(odd) {  
> background-color: #404040;  
> }

Can someone point me in the right direction to do the same thing but for the categories page?

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [March 2, 2019, 9:12pm UTC](https://meta.discourse.org/t/category-list-alternating-colors/110524/2 "2019-03-02T21:12:12Z")

</div>

Do you mean a background color for the topics list in the category page? Then you should like use `latest-topic-list-item`?  
If you mean the categories list, then likely `.category-list tr`  
.

---

<div class="post-metadata">

### Author: ![cz1](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@cz1](https://meta.discourse.org/u/cz1)
#### Post date: [March 2, 2019, 9:18pm UTC](https://meta.discourse.org/t/category-list-alternating-colors/110524/3 "2019-03-02T21:18:45Z")

</div>

I’m looking to change the background color for the categories list, but I am trying to alternate the colors. Exactly like this.

 ![](https://global.discourse-cdn.com/meta/original/3X/1/4/1414e70f3310e4a5dfe7a866a9a14b8de158ef43.png)

---

<div class="post-metadata">

### Author: ![cz1](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@cz1](https://meta.discourse.org/u/cz1)
#### Post date: [March 2, 2019, 9:21pm UTC](https://meta.discourse.org/t/category-list-alternating-colors/110524/4 "2019-03-02T21:21:51Z")

</div>

I got it, you pointed me in the right direction :).

> .category-list tr:nth-child(odd) {  
> background-color: #404040;  
> }

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [April 1, 2019, 9:21pm UTC](https://meta.discourse.org/t/category-list-alternating-colors/110524/5 "2019-04-01T21:21:52Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
