...

View Full Version : Floating toolbar



Vermelh0
07-25-2002, 09:45 PM
I have a toolbar that I want to have always visible at the top of the page. I was wondering if I could perhaps implement this with javascript or css. The only way I know of implementing this is by creating two frames, and I don't want to do that because I would lose months of work rewriting my site.
Thanks again,
V

Roy Sinclair
07-25-2002, 11:40 PM
For Mozilla and other Gecko based browsers you can use straight CSS:

<div style="position:fixed ; left: 0px; top: 0px;">The Content</div>


For IE you have to use position:absolute and reposition it each time the page is scrolled.

Vermelh0
07-25-2002, 11:46 PM
Thanks for your reply.
I'm designing for IE...
How can I repositing the toolbar like you said?
V

Roy Sinclair
07-26-2002, 09:06 PM
The technique used by this (http://javascript.internet.com/navigation/portable-menu.html) script should show you how to make it happen.

Vermelh0
07-26-2002, 09:24 PM
Again, thanks for the help....
Hum, the author of that script seems to have created confusing script on purpose. He has like 10 variables to call one freaking function, but I got the jist of it.
I also was creating something on my own on your suggestion.
I set the toolbar's position global style normally like you said, and then created a body onscroll function, which updated the position of the toolbar, with the index of the scrolltop function.
It was easier than what I had thought.
Thanks,
V



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum