Navigation menu stuck inside header. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Navigation menu stuck inside header.

I was creating a navigation menu. But when I press the hamburger menu icon, it appears inside the header. How can I fix it. I want to show it on the left side. Code link: https://code.sololearn.com/WUg1B45saPxi/?ref=app

3rd Oct 2020, 9:28 AM
Bibek Oli
Bibek Oli - avatar
4 Answers
+ 2
these lines are responsible for displaying it in a row: display: flex; flex-direction: row; use flex-direction: column to make them be in a column. you could also try .header { position: relative; } .nav { position: absolute; left: 0; bottom: -100%; }
3rd Oct 2020, 9:42 AM
John Doe
+ 2
do you mean something like this? top: 100% was better than bottom: -100%, my bad. https://code.sololearn.com/W6zBEolQ45Ke/?ref=app
3rd Oct 2020, 10:31 AM
John Doe
+ 1
John Doe it's not working with me, can you send the working code..
3rd Oct 2020, 10:02 AM
Bibek Oli
Bibek Oli - avatar
+ 1
Yes, now a little bit more modification. If user clicks outside the navigation container, the nav should hide. And disable scrolling down the page when the menu is open. Thank you..☺️
3rd Oct 2020, 1:45 PM
Bibek Oli
Bibek Oli - avatar