CSS CSS Flexbox Layout Building a Layout with Flexbox Creating a Sticky Footer with Flexbox

How to make a **fixed** navigation menu with "display: flex;"

I tried setting my navigation's position to fixed but it doesn't seem to work. I did some research and it says it's impossible to do so. Is it true?

2 Answers

Mikkel Rasmussen
Mikkel Rasmussen
31,768 Points

Yes, it is definitely possible to make a fixed navigation with flexbox :)

Please take a look at this snippet showing a fixed navigation with flexbox: https://jsfiddle.net/0bv04rso/13/

If you got any question regarding the code (not my code, but will do my best to answer) please let me know and I will try to explain what is happening :)

Thank you so much ^_^!! I could understand how it works by reading the code.

Aurelian Spodarec
Aurelian Spodarec
10,784 Points

It's very simple

Just write

position: fixed;

and whala!

Sure :).