# Portfolio: Fixed Nav Bar

**URL:** <https://forum.freecodecamp.org/t/portfolio-fixed-nav-bar/191922>\
**Category:** General\
**Created:** [May 19, 2018, 1:26am UTC](https://forum.freecodecamp.org/t/portfolio-fixed-nav-bar/191922 "2018-05-19T01:26:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarcelPenn](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/marcelpenn/32/115945_2.png) [@MarcelPenn](https://forum.freecodecamp.org/u/MarcelPenn)\
**Post date:** [May 19, 2018, 1:26am UTC](https://forum.freecodecamp.org/t/portfolio-fixed-nav-bar/191922/1 "2018-05-19T01:26:11Z")

</div>

Hello everyone! Was hoping someone could help me fix the nav bar to the top of the screen when scrolling on this [https://codepen.io/MarcelPenn/pen/KRXqod](https://codepen.io/MarcelPenn/pen/KRXqod) project. I tried _position: fixed_ in the nav css, but it made the bar disappear completely lol. Any help would much appreciated!

---

<div class="post-metadata">

**Author:** ![Gkleinereva](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/gkleinereva/32/84482_2.png) [@Gkleinereva](https://forum.freecodecamp.org/u/Gkleinereva)\
**Post date:** [May 19, 2018, 2:02am UTC](https://forum.freecodecamp.org/t/portfolio-fixed-nav-bar/191922/2 "2018-05-19T02:02:05Z")

</div>

The bar doesn’t disappear completely when you set it to fixed; it just changes the color to match your background color (you can still see the links if you look carefully). I think this has something to do with the fact that your nav is nested inside of a header. I believe navs are typically used outside of a header; maybe try that?

As a sidenote, you could use bootstrap for your UI elements in this project. It will take care of a lot of this pesky stuff for you.

---

<div class="post-metadata">

**Author:** ![MarcelPenn](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/marcelpenn/32/115945_2.png) [@MarcelPenn](https://forum.freecodecamp.org/u/MarcelPenn)\
**Post date:** [May 19, 2018, 2:17am UTC](https://forum.freecodecamp.org/t/portfolio-fixed-nav-bar/191922/3 "2018-05-19T02:17:48Z")

</div>

Ah, ic,. You might be right but taking it outside the header but that gives me a whole bunch of new problems with my current code lol. You did give me a couple of ideas though and maybe I’ll attempt a separate one with bootstrap. Thanks!

---

<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, 8:21pm UTC](https://forum.freecodecamp.org/t/portfolio-fixed-nav-bar/191922/4 "2021-01-17T20:21:21Z")

</div>

Closed on January 17, 2021, 8:21pm UTC


