Help with sticky positioning

I want the .intro div to stick to the top of the page when scrolling, but when I do so the .rest div is overlapping with .intro div instead of disappearing behind the .intro div as you scroll

I am new to coding and just trying out basics that I have learned in html and css

Can anyone assist?