What I am aiming for is along the lines of the example at http://net.tutsplus.com/tutorials/html-css-techniques/creating-a-floating-html-menu-using-jquery-and-css/
However I would like to constraint the floating div within another parent div.
E.g.
I would like a menu div to be floating in the above light grey box, but it should not go outside out of it.
Any of the examples that I have seen for floating divs have all simply based their position off the top or bottom of the window. Has anyone tried to do this like the above?
Thanks.