CSS Fixed Position
You should take a look at css position: fixed. Fixed position means that it will stay in the same place relative to the browser viewing pane regardless of scroll position. You should note that a fixed position element will overlap other elements.
If you set a fixed position in a header, it would go over the top of the body as the user scrolled remaining at the top of the browser pane.
The same goes with a footer, it would be at the bottom on top until you scrolled to the bottom.
Fixed positioning can also come in handy for a left navigation menu that you want to carry with the user as they scroll down in an article. If you take the navigation element and add a fixed position to it, once the user scrolls down past the element then the element will stay on the page where it belongs.