This is driving me insane. I have a fixed position header and a fixed position footer. I want the page class to scroll between the two.
For some reason, my page class starts at top:0 of the entire document, instead of starting below the header.
I could bypass the problem by relative positioning all contents of the div by the appropriate height, but I will be using page IDs to navigate the page. So when I navigate to an #ID using an a link, it navigates to the top of the document.
How do I fix this!?
Your header position is
fixed, which takes it out of the flow of the document. Not only does that mean it sits where you put it, but it also means it doesn’t push the content below it downwards.Easy fix would be to add a margin to the page div that’s exactly the size of the “always-on-top” header.