Submitted by Art Williams on Thu, 04/12/2012 - 9:19am

@jake: @mukwenhac is half way there. We use a little javascript to detect when the div gets to the top of the browser window and then we apply a class called 'fixed' which sets the css to 'position:fixed'. It's pretty straightforward. JD is the one who implemented it on this site.

Here is the javascript:

You can firebug the element to see the css we used.

The content of this field is kept private and will not be shown publicly.

Plain text

  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.