# No gap between vote count and tags in header

**URL:** https://meta.discourse.org/t/no-gap-between-vote-count-and-tags-in-header/308927
**Category:** Site feedback
**Tags:** topic-voting
**Created:** [May 21, 2024, 9:54pm UTC](https://meta.discourse.org/t/no-gap-between-vote-count-and-tags-in-header/308927 "2024-05-21T21:54:02Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [May 21, 2024, 9:54pm UTC](https://meta.discourse.org/t/no-gap-between-vote-count-and-tags-in-header/308927/1 "2024-05-21T21:54:02Z")

</div>

Similar to [No Gap Between Vote Count and Tags in Topic List](https://meta.discourse.org/t/no-gap-between-vote-count-and-tags-in-topic-list/298250) there is also no gap between votes and the tag(s) in the header when there are 0 votes and at least 1 tag

 ![Screenshot_20240521_235308_Chrome](https://global.discourse-cdn.com/meta/original/4X/2/7/2/272a73c5c742e72c2adaa285c1ba17cb3463a46f.jpeg)

---

<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: [May 21, 2024, 10:30pm UTC](https://meta.discourse.org/t/no-gap-between-vote-count-and-tags-in-header/308927/2 "2024-05-21T22:30:10Z")

</div>

That might be my fault 🤔

Is it just on meta, or can you see the same thing on another site?

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [May 21, 2024, 10:32pm UTC](https://meta.discourse.org/t/no-gap-between-vote-count-and-tags-in-header/308927/3 "2024-05-21T22:32:55Z")

</div>

I did not notice it anywhere else and it isn’t a problem in [safe mode](https://meta.discourse.org/t/53504?silent=true)

---

<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: [May 21, 2024, 10:35pm UTC](https://meta.discourse.org/t/no-gap-between-vote-count-and-tags-in-header/308927/4 "2024-05-21T22:35:30Z")

</div>

I found this and used it:

```css
// hide 0 vote count

.vote-count-0 {
  display: none; 
}

// hide the comma on the second to last tag

.discourse-tags:has(.vote-count-0) { 
  .discourse-tag:nth-last-child(2):after {
     display: none; 
  }
}

```

It may need a tweak?

---

<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: [May 22, 2024, 4:07am UTC](https://meta.discourse.org/t/no-gap-between-vote-count-and-tags-in-header/308927/5 "2024-05-22T04:07:43Z")

</div>

I think you can improve the CSS this way, so you don’t need to specify what child (_it can be useful if something is displayed after the votes; for example_).

```css
.discourse-tags {
    /* hide 0 vote count */
    .vote-count-0,
    
    /* hides the comma from the previous sibling of .vote-count-0 */
    & :has(+ .vote-count-0)::after { 
      display: none !important;
    }
}

```

---

<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: [May 22, 2024, 4:20am UTC](https://meta.discourse.org/t/no-gap-between-vote-count-and-tags-in-header/308927/6 "2024-05-22T04:20:56Z")

</div>

Let’s give to a try ❤ 🙂

---

<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: [May 22, 2024, 4:22am UTC](https://meta.discourse.org/t/no-gap-between-vote-count-and-tags-in-header/308927/7 "2024-05-22T04:22:22Z")

</div>

It looks like you might need `!important`. I noticed it’s overwritten by _header.scss_. I updated the code above.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [May 22, 2024, 6:37am UTC](https://meta.discourse.org/t/no-gap-between-vote-count-and-tags-in-header/308927/8 "2024-05-22T06:37:06Z")

</div>

note I always recommend important to be last resort, usually I go for making stuff more selective if at all possible.

---

<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: [May 22, 2024, 10:58am UTC](https://meta.discourse.org/t/no-gap-between-vote-count-and-tags-in-header/308927/9 "2024-05-22T10:58:37Z")

</div>

I went with this:

```css
.topic-list .discourse-tags {
    /* hide 0 vote count */
    .vote-count-0,
    
    /* hides the comma from the previous sibling of .vote-count-0 */
    & :has(+ .vote-count-0)::after { 
      display: none 
    }
}

```

Keeping the ‘0 votes’ info in-topic felt right, and this tidied up the spacing.

* * *

I noticed that I also needed to hide them from inside the #feedback topics… After some time I finally landed on this:

```css

.ask-chapoi {

 display: humbleness;
 admit: failure;

}

```
