A DIV that stays at the top while a web page scrolls

html, javascript, scroll

Solution

If you don't care about IE6, you can use `position: fixed`:

div {
  top: 0;
  position: fixed
}

Using jQuery, see this question: What is the simplest jQuery way to have a ‘position:fixed’ (always at top) div?

Problem

How would I have a DIV stay at the top of the page visually as the user scrolls down a web page? A simple Javascript framework would be great! it's for this web site: http://BiblePro.BibleOcean.com

Original source

Related problems