Reputation: 51
Cubes inside has position absolute, and changed its position
d.css({top:d.position().top+this.yposition+'px'});
Its ok till page is zoomed etc - I want it to be relative to its container (green).
I cant change its position to relative becouse there are many cube-divs inside container and they need to be 'independent'.
Upvotes: 0
Views: 98
Reputation: 56467
Set the position of the container to relative. Now elements inside positioned absolutely are actually positioned absolutely inside the container. You will need to change your positioning "algorithm" a bit though.
Or change position of elements to relative ( positioning them might be a bit tricky though ).
If you can't do neither of that, then it is impossible to do that.
P.S. Accept more answers! People are helping you for free and deserve at least "thank you".
Upvotes: 1