• Follow us on
  • rss
Sticky positioning

Sticky positioning

Social commentator

will behave just like a relatively positioned element until the viewport scrolls such that the element would be less than 10px from the top. Then, it will be fixed to 10px from the top until the viewport is scrolled back passed this threshold.

Sticky positioning is commonly used for the headings in an alphabetized listing. The B heading will appear just below the items that begin with A until they are scrolled offscreen. Rather than sliding offscreen with the rest of the content, the B heading will then remain fixed to the top of the viewport until all the B items have scrolled offscreen, at which point it will be covered up by the C heading.


10/2006: But I must explain to you how all
10/2005: Excepteur sint occaecat cupidatat non proident Temporibus debitis aut rerum
10/2006: vel illum qui dolorem eum fugiat quo
11/2007: dolore eu fugiat nulla pariatur