# Voorkom dat de 'Last Visit'-balk kleuren verpest

**URL:** <https://meta.discourse.org/t/prevent-last-visit-bar-from-messing-up-colors/216509>\
**Category:** Product Support\
**Tags:** plugin-api\
**Created:** [30 januari 2022 om 19:49 UTC](https://meta.discourse.org/t/prevent-last-visit-bar-from-messing-up-colors/216509 "2022-01-30T19:49:58Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![saquetim](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saquetim/32/116400_2.png) [@saquetim](https://meta.discourse.org/u/saquetim)\
**Post date:** [3 februari 2022 om 03:13 UTC](https://meta.discourse.org/t/prevent-last-visit-bar-from-messing-up-colors/216509/8 "2022-02-03T03:13:19Z")

</div>

> [@orangeandblack5](#):
>
> Anybody have a better idea of how we can accomplish this?

> [@Falco](#):
>
> Isn’t it possible to use a more specific selector here in order to stay in a pure CSS solution?

It is possible to accomplish the same effect using just CSS but it’s kinda hacky and it will work only in the post stream. It won’t work in the topics list. There Javascript will be needed since only Safary selects the `:nth-child( of <selector> syntax)` and as far I can tell there aren’t any attributes that can be targeted to apply the effect.

@orangeandblack5, you have to target the `article` element inside the posts. Note that the `id` attribute follows the pattern `id=post_N` where N is the number of the post in the stream.

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/7/77c32bc2311a8b5dec04d476cea97e17099ba2ec.png)

So you can target only the even ones with something like the CSS below:

```css
.topic-post {
    article[id$="0"], article[id$="2"], article[id$="4"], article[id$="6"], article[id$="8"] {
        background-color: peachpuff;
    }
}

```

---

_[View the full topic](https://meta.discourse.org/t/prevent-last-visit-bar-from-messing-up-colors/216509)._
