About adding a scroll bar to a nav tag

I was working on the technical documentation page project.
I tried to add a scroll bar to the nav-bar,
and I put
#navbar span {overflow: auto }
in the css but it doesn’t work

what is the problem please?? thank you!!

click here to my project

do i have to use the <ul> and <li> tag to do this?

Hello @xavier.yeung

I don’t know what kind of scroll you want to add to the element. Is it vertical, horizontal or both? You might want to read the MDN documentation in the link below. There is something you are missing.
https://developer.mozilla.org/en-US/docs/Web/CSS/overflow

1 Like

thank you! i will go through this first!

Why are you selecting span element?

Are you familiar with the CSS box model? If not, go have a read on MDN web docs.

the code before was like

<span> 123</span>
<span>456</span>
<span>789</span>
</div>

so i thought

#span { overflow: auto}

would create a scroll bar on those span haha