# CSS selector for the Category Page Latest Post column?

**URL:** <https://meta.discourse.org/t/css-selector-for-the-category-page-latest-post-column/85922>\
**Category:** Development\
**Tags:** css\
**Created:** [April 22, 2018, 8:24pm UTC](https://meta.discourse.org/t/css-selector-for-the-category-page-latest-post-column/85922 "2018-04-22T20:24:03Z")\
**Posts on this page:** 5\
**Page:** 1

## AI-generated summary

The discussion revolves around CSS selectors for styling the Latest Post column on the main Category Page. [BlackKnob](/t/-/85922/1) initially struggled to remove the border from the last item in the column, but [Mittineague](/t/-/85922/2) provided a solution using the `:nth-last-child(2)` pseudo-class. The working CSS selector is `.latest-topic-list-item:nth-last-child(2) {border-bottom-style: none;}`. [j127](/t/-/85922/4) then inquired about targeting the Latest Post column specifically, but struggled to find a unique selector for the home page.

<div class="post-metadata">

**Author:** ![BlackKnob](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blackknob/32/93549_2.png) [@BlackKnob](https://meta.discourse.org/u/BlackKnob)\
**Post date:** [April 22, 2018, 8:24pm UTC](https://meta.discourse.org/t/css-selector-for-the-category-page-latest-post-column/85922/1 "2018-04-22T20:24:03Z")

</div>

I need to remove the border on the bottom of the Latest Posts column of the main Category Page.

The following doesn’t work:  
`div.latest-topic-list-item:last-child {border-bottom-style: none;}`

For some reason this is the only list not structured as a table, just DIVs, which makes it more difficult to style with CSS.

---

<div class="post-metadata">

**Author:** ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)\
**Post date:** [April 22, 2018, 9:22pm UTC](https://meta.discourse.org/t/css-selector-for-the-category-page-latest-post-column/85922/2 "2018-04-22T21:22:40Z")

</div>

Instead of last-child (which it isn’t) try going backwards skipping one. eg.

```plaintext
#list-area .categories-and-latest .column .latest-topic-list .latest-topic-list-item:nth-last-child(2) {
background-color: #f00; } 

```

I imagine at least half of those selectors can be safely removed, but I’ll leave it to you to do the tweaking.

---

<div class="post-metadata">

**Author:** ![BlackKnob](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blackknob/32/93549_2.png) [@BlackKnob](https://meta.discourse.org/u/BlackKnob)\
**Post date:** [April 22, 2018, 9:30pm UTC](https://meta.discourse.org/t/css-selector-for-the-category-page-latest-post-column/85922/3 "2018-04-22T21:30:20Z")

</div>

yes, it works! thank you so much @Mittineague.

`.latest-topic-list-item:nth-last-child(2) {border-bottom-style: none;}`

---

<div class="post-metadata">

**Author:** ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)\
**Post date:** [June 3, 2020, 7:40pm UTC](https://meta.discourse.org/t/css-selector-for-the-category-page-latest-post-column/85922/4 "2020-06-03T19:40:43Z")

</div>

Is the `.latest-topic-list` selector still available? I’m trying to remove certain posts from the home page (“latest” view only) with CSS (long story), but I’ve been having trouble finding a selector that can target just the home page.

This works, but it hides the posts on other views too:

```css
[data-topic-id="123"] {
    display: none;
}

```

Something like this would be perfect, but I don’t see the `.latest-topic-list` selector (or any unique selector for the latest topic view) on the page:

```css
.latest-topic-list [data-topic-id="123"] {
    display: none;
}

```

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [November 14, 2023, 11:07am UTC](https://meta.discourse.org/t/css-selector-for-the-category-page-latest-post-column/85922/5 "2023-11-14T11:07:21Z")

</div>

Closed on November 14, 2023, 11:07am UTC


