Floating div with boundaries
Posted: Sun Jul 11, 2010 1:24 pm
Hello all,
I'm still fairly new to the whole world of programming, but I'm getting there slowly! Reading these boards is incredibly helpful.
Anyway, here is a simple query, or at least it looks simple on the surface...
I would like to have a floating div follow the user as they scroll the page. I have found the EXACT script that I need here: http://www.jtricks.com/javascript/navig ... ating.html
The only thing is I would like the floating menu to float within another div and not move from out side of that containing div. As the script is, the menu position is absolute relative to the browser. Is there a way to make the floating div absolute to the boundaries of a second containing div (ie main content div of 700px width)?
Thanks for any input!
I'm still fairly new to the whole world of programming, but I'm getting there slowly! Reading these boards is incredibly helpful.
Anyway, here is a simple query, or at least it looks simple on the surface...
I would like to have a floating div follow the user as they scroll the page. I have found the EXACT script that I need here: http://www.jtricks.com/javascript/navig ... ating.html
The only thing is I would like the floating menu to float within another div and not move from out side of that containing div. As the script is, the menu position is absolute relative to the browser. Is there a way to make the floating div absolute to the boundaries of a second containing div (ie main content div of 700px width)?
Thanks for any input!