Positioning in Practice
Using the fixed position also allows you to develop headers or menu bars that are “sticky”. Study the following example for how to create a “sticky header and menu”.
Notice, that when you scroll the below example, the header stays in place. Also notice, that in order to accomplish this look, we have to move the
.main-content container down, so that it does not appear behind the header.