PDA

View Full Version : Floating Top Bar Script on the right



romenyrr
10-04-2010, 03:15 PM
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 :)

bluewalrus
10-04-2010, 03:35 PM
Not sure about that exact script but just a floating bar you can do with css. For example:


<div id="right_bar">
right content</div>


css:


#right_bar {
position:fixed;
height:400px;
width:30px;
right:0px;
}

parmenti
11-01-2011, 02:27 AM
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.

parmenti
11-01-2011, 02:53 AM
I solved it.. if anyone else should need assistance with this it's rather easy..

simply change:


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

to


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