Re: Getting items to drift up or down

by "EB" <doublebase(at)wanadoo.nl>

 Date:  Wed, 26 Sep 2001 21:12:01 +0200
 To:  <hwg-techniques(at)hwg.org>
 References:  get2net
  todo: View Thread, Original
----- Original Message -----
From: George Nielsen <genie(at)postone.com>
To: <hwg-techniques(at)hwg.org>
Sent: Wednesday, September 26, 2001 5:59 PM
Subject: Getting items to drift up or down


| Could anyone please tell me how I can get items, such as active menus, to
| drift down whenever one scrolls down, so that they constantly remain in
| view, and then to drift up when one scrolls up, so that they remain in
| view, and get back on the top of the page.

#movingmenu {
    position: fixed; top(or bottom): *px; left(or right): *px;
}

see http://www.w3.org/Style/CSS/ for a working example;
shaky browser support by now,
works in opera5.1 and netscape6.1, doesn't work in ie5 (all windows).
look for a compatibility chart, i don't have a link available now.

you can do it with javascript, but it's an ugly solution and support is
unknown because you don't know your visitor's browser configuration ;-)

the advantage of the css method is that the worst scenario is that the menu
won't move; the worst js scenario is that the menu isn't there.

cheers, eric

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA