smithtimmytim/brightlycolored.org

View on GitHub
_posts/2016-07-27-sticky-headers-by-jeremy-keith.markdown

Summary

Maintainability
Test Coverage
---
title: Sticky Headers by Jeremy Keith
date: 2016-07-27 00:31:00 -05:00
tags:
- CSS
layout: post
custom_type: link
link_url: https://adactio.com/journal/10877
---

Jeremy Keith:

>I made a little tweak to [The Session](https://thesession.org/) today. The navigation bar across the top is “sticky” now—it doesn’t scroll with the rest of the content.
>
> I made sure that the stickiness only kicks in if the screen is both wide and tall enough to warrant it. [Vertical media queries](https://boagworld.com/dev/vertical-media-queries/) are your friend!

Some practical advice when creating these sticky headers so you don't mess anything up accessibility-wise.