I recently attended ffconf, and was introduced to
position: sticky;. Support
for it is patchy, but where not available the header will scroll out of view as
it did in the past. Where available, the navbar will stick to the top of the
window when the rest of the header is scrolled out of view.
Update: You can view the video of Rachel Andrew's presentation including
position: sticky; here.