The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS "Sticky" element trick?

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #23611

    Most people here are probably familiar with QuirksMode. Go to the site and note the "show site navigation" link at the top left (it’s not on the front page, but any of the inner pages, like About). Scroll the page down and watch what happens – the link scrolls with the page until it’s about to scroll out of view, at which point it stays fixed in position!

    Does anyone have any idea how this works? I can’t figure it out. It’s not just straight fixed position, because the link will scroll with the page initially. When inspecting it with Firebug, I can see the value of "top" changes dynamically as you scroll – he must have some JavaScript that does this.

    Any insight into this would be much appreciated!

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.