I am trying to create a page where the navbar is fixed to the top of the page, with the main content below, however when I scroll the page the main content slides over the navbar instead of going below it, I am not sure why this is happening.
Hello, and welcome to the forum! I have taken your code and put it inside a codepen. You can view it here, from what I understand this is the behavior you want? The problem was your relative positioning for your main selector.