# Empty \<li\> in Discourse navigation

**URL:** https://meta.discourse.org/t/empty-li-in-discourse-navigation/242440
**Category:** Development
**Created:** [October 20, 2022, 2:49am UTC](https://meta.discourse.org/t/empty-li-in-discourse-navigation/242440 "2022-10-20T02:49:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![carson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/carson/32/280685_2.png) [@carson](https://meta.discourse.org/u/carson)
#### Post date: [October 20, 2022, 2:49am UTC](https://meta.discourse.org/t/empty-li-in-discourse-navigation/242440/1 "2022-10-20T02:49:21Z")

</div>

Hello, this isn’t a super big deal but I noticed that there’s always an empty `<li>` tag at the end of every Discourse navigation bar; I was wondering if this was intentional on the developers’ behalf? I wanted to style the navigation list items based on :first-child and :last-child for a theme, and currently I’m using :nth-last-child(2) as a workaround.

 ![](https://global.discourse-cdn.com/meta/original/4X/5/2/1/521e80fa4305ba9761fa2be124465bce8d1c39bf.png)

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [October 21, 2022, 10:15pm UTC](https://meta.discourse.org/t/empty-li-in-discourse-navigation/242440/2 "2022-10-21T22:15:30Z")

</div>

There’s an old outlet that can be used to add a navigation item there… that’s creating the empty tag.

> <https://github.com/discourse/discourse/blob/371bbadb92c02a43ae2ea362ead53cf6a4e575de/app/assets/javascripts/discourse/app/templates/components/navigation-bar.hbs#L4>

It appears to be unused, and we have one of our more standard plugin outlets immediately after it (which doesn’t create an empty tag)… so I’ve submitted a PR to remove it. If you update Discourse sometime next week it should go away. Thanks for mentioning it.
