Hi there,

I'm busy trying to build an interface where users can create a sort of collage with images that they upload. I know it is possible to get the position of a DHTML element relative to the screen, the problem is I need the coordinates relative to a main div tag so that I can "compile" the collage and then when it gets served it will look the same regardless of screen size.

Thanks in advance for any help

7 Years
Discussion Span
Last Post by Menster

Then just get the absolute positions of both then subtract the item you want's position from the item that it's relative from.

Box1 : x 100, y 200
Box2 : x 234, y 123
Box2 Relative Box1: x 134, y -77

Edited by ShawnCplus: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.