Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Floating toolbar

    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

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #3
    New Coder
    Join Date
    Jul 2002
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for your reply.
    I'm designing for IE...
    How can I repositing the toolbar like you said?
    V

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The technique used by this script should show you how to make it happen.

  • #5
    New Coder
    Join Date
    Jul 2002
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •