Overflow: Scroll doesn't work

I have added “Overflow : auto” to the navbar ul and it doesn’t work. When I change it to “Overflow: scroll” it never shows a scrollbar.

I can’t get it to work. Does anyone know what might be the problem?

Thank you in advance!

The element you set scroll for, never needs a scrolling, becasue it always has its space to render(its parent gives it).

Check the parent element(nav). I don’t know how does position:sticky work, but since you set the height 100% for this element too, it won’t need any scroll too.

Maybe try max-height:100vh for #navbar and see if it works as expected.

Happy coding.

1 Like

Thanks! Fixed it.

Any reason the JS script for the website test doesn’t work?