Results 1 to 4 of 4

Thread: Floating Top Bar Script on the right

  1. #1
    Join Date
    Oct 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Floating Top Bar Script on the right

    1) Script Title: Floating Top Bar Script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/floatbar.htm

    3) Describe problem: I would like to be able to position the floating bar on the right side. Does anyone have the updated code for this. I've tried messing the with the offsets, but the problem is, with different screen resolutions it's not always in the right spot. i would like to position the bar by the browser scrollbars

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Not sure about that exact script but just a floating bar you can do with css. For example:

    Code:
    <div id="right_bar">
    right content</div>
    css:

    Code:
    #right_bar {
    position:fixed;
    height:400px;
    width:30px;
    right:0px;
    }
    Corrections to my coding/thoughts welcome.

  3. #3
    Join Date
    Apr 2005
    Posts
    17
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Anybody have any other suggestions for this problem? This does not work and I've been trying quite a few other ideas too without success. I want it to essentially float flush against the bottom right of the screen.. I can only get it to work on the bottom left.

  4. #4
    Join Date
    Apr 2005
    Posts
    17
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    I solved it.. if anyone else should need assistance with this it's rather easy..

    simply change:

    Code:
    el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};
    to

    Code:
    el.sP=function(x,y){this.style.right=x+"px";this.style.top=y+"px";};

Bookmarks

Posting Permissions

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