Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
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?
Mikkel Rasmussen31,769 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 :)