How to solve the navigation menu problem?(web) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to solve the navigation menu problem?(web)

The code crashes when I hover on li tag.this is my html code And my css code :https://code.sololearn.com/WDVac5eNmk93/#html

7th Oct 2020, 2:08 PM
Mohammad Rajaei
Mohammad Rajaei - avatar
3 Answers
+ 3
Add position:absolute; to the item container. last line of css should be .menu:hover .item-container { display:block; position: absolute; } this should solve the problem, i've tested it. Mohammad Rajaei
7th Oct 2020, 2:11 PM
Steve Sajeev
Steve Sajeev - avatar
+ 3
When you add position absolute that objects position will not affect anything else. These objects will be able to come over other objects.
8th Oct 2020, 1:52 AM
Steve Sajeev
Steve Sajeev - avatar
0
Steve Sajeev Thank you for your answer, but I did not understand why you should use absolute here. Please explain a little. What does it do here?
7th Oct 2020, 9:17 PM
Mohammad Rajaei
Mohammad Rajaei - avatar