View Full Version : Top Floating Navigation

06-01-2009, 07:58 PM
I'm trying to create a vertical navigation bar, but I want it to float in an unusual way.
I want the navigation to be under the banner, but to scroll to the top of the screen when the content is scrolled.
Confused? Here's an example:
I want to create a div for my nav bar that behaves the same way as the video/ad box on the left side of the page.
Any help would be greatly appreciated!
Thanks in advance

- Toby

06-02-2009, 03:27 AM
The basic behavior of the Yahoo example is "position: fixed" in the CSS. But the way it only becomes "fixed" once it's moved to the top is controlled by Javascript.

A CSS-only version would be interesting, though.

06-02-2009, 02:52 PM
Yea, I tried playing around with their css on a site of my own, and I realized there had to be more to it than just the css.
I tried to pick the site apart, but I can't figure out which of the javascripts is creating that effect. Anyone know where the controlling script is?


06-02-2009, 03:30 PM
You may find this site (http://bonrouge.com/~faq)of interest,

And also much more here (http://exitfegs.co.uk/Sources.html).


06-02-2009, 07:18 PM
Thanks effpeetee!
The second site you sent me (bonrouge) didn't have what I needed, but actually led me to dynamic drive where I found this:


The menu on the left is just what I needed, I just have to strip it and tweak it for my site.

Thanks again!