0

Help in horizontal navbar with dropdown position sticky not working

I made a horizontal navbar with a dropdown and tried to sticky that on top but it is not working you can click on the below link and see the code if possible write what I have done wrong in the CSS editor as a comment which will help me the most. Thank you. Here is the link: https://www.sololearn.com/compiler-playground/W7dIqWeNztA1

16th May 2023, 12:47 PM
Mohit Kumar
Mohit Kumar - avatar
3 Respostas
+ 1
Are you attempting to achieve this https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_navbar_sticky ? If so you will need to add the Javascript part.
16th May 2023, 6:58 PM
Chris Coder
Chris Coder - avatar
16th May 2023, 6:40 PM
Chris Coder
Chris Coder - avatar
0
but that is possible without Javascript also you can see this code which I have tried before and in this, it is working that time you can see it by clicking on the below link https://www.sololearn.com/compiler-playground/WV1bHucq0xoz
17th May 2023, 11:08 AM
Mohit Kumar
Mohit Kumar - avatar