# Nav fixed to left column of the screen

**URL:** <https://forum.freecodecamp.org/t/nav-fixed-to-left-column-of-the-screen/294079>\
**Category:** General\
**Created:** [July 10, 2019, 9:44pm UTC](https://forum.freecodecamp.org/t/nav-fixed-to-left-column-of-the-screen/294079 "2019-07-10T21:44:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kobe\_Richardson](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/kobe_richardson/32/122027_2.png) [@Kobe\_Richardson](https://forum.freecodecamp.org/u/Kobe_Richardson)\
**Post date:** [July 10, 2019, 9:44pm UTC](https://forum.freecodecamp.org/t/nav-fixed-to-left-column-of-the-screen/294079/1 "2019-07-10T21:44:11Z")

</div>

Nothing seems to be working. I need to get it to float center somehow without messing my layout.

Here is my pen:  
[https://codepen.io/KobadaTech/pen/NZoBaL](https://codepen.io/KobadaTech/pen/NZoBaL)

---

<div class="post-metadata">

**Author:** ![Kobe\_Richardson](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/kobe_richardson/32/122027_2.png) [@Kobe\_Richardson](https://forum.freecodecamp.org/u/Kobe_Richardson)\
**Post date:** [July 10, 2019, 10:42pm UTC](https://forum.freecodecamp.org/t/nav-fixed-to-left-column-of-the-screen/294079/3 "2019-07-10T22:42:10Z")

</div>

I’ve moved my nav to directly under the body element. I also managed to get the nav to lay horizontally accross the top. However, it is now saying the navbar should always be at the top of the viewport. I tried using position:fixed; for nav but that didn’t work either.

---

<div class="post-metadata">

**Author:** ![lasjorg](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lasjorg/32/280761_2.png) [@lasjorg](https://forum.freecodecamp.org/u/lasjorg)\
**Post date:** [July 11, 2019, 12:11am UTC](https://forum.freecodecamp.org/t/nav-fixed-to-left-column-of-the-screen/294079/4 "2019-07-11T00:11:55Z")

</div>

1. On `.nav` you have a colon after `position: fixed`, it should be a semicolon.

2. If you move `position: fixed;` to the `#navbar` element it will pass the test. You will have to make some changes to make it look the same.

---

<div class="post-metadata">

**Author:** ![Kobe\_Richardson](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/kobe_richardson/32/122027_2.png) [@Kobe\_Richardson](https://forum.freecodecamp.org/u/Kobe_Richardson)\
**Post date:** [July 11, 2019, 12:24am UTC](https://forum.freecodecamp.org/t/nav-fixed-to-left-column-of-the-screen/294079/5 "2019-07-11T00:24:10Z")

</div>

Thanks mate that done the trick!

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 17, 2021, 9:33am UTC](https://forum.freecodecamp.org/t/nav-fixed-to-left-column-of-the-screen/294079/6 "2021-01-17T09:33:44Z")

</div>

Closed on January 17, 2021, 9:33am UTC


