Overflow: Scroll doesn't work

Overflow: Scroll doesn't work
0

#1

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!


#2

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.


#3

Thanks! Fixed it.

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