Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialLina Dorem
4,543 PointsHow 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
31,772 PointsYes, 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 :)
Lina Dorem
4,543 PointsSure :).
Lina Dorem
4,543 PointsLina Dorem
4,543 PointsThank you so much ^_^!! I could understand how it works by reading the code.
Aurelian Spodarec
10,801 PointsAurelian Spodarec
10,801 PointsIt's very simple
Just write
position: fixed;
and whala!