AaronW
06-20-2005, 11:25 PM
I've got a fancy-shmancy design which is accomplished with CSS positioning. Floating, absolute & relative positioning and so on. In this layout is an image gallery. Each image in said gallery has a child--"description"--which contains the caption for the image. Using the obvious DOM and CSS methods, I've got that caption showing up beside the image when it's hovered over, but IE draws the caption underneath just about everything on the page (z-index is being ignored).
So I've thought of another approach: I'll dynamically insert a DIV as a child of BODY and I'll stuff it with the cloned contents of the hovered image's description element, then position it beside the image. That last step has me stumped though. How do I get the top & left coordinates of the image--relative to the BODY--in order to position my new description DIV at the same spot?
Any help with this would be much appreciated.
Thanks,
Aaron
So I've thought of another approach: I'll dynamically insert a DIV as a child of BODY and I'll stuff it with the cloned contents of the hovered image's description element, then position it beside the image. That last step has me stumped though. How do I get the top & left coordinates of the image--relative to the BODY--in order to position my new description DIV at the same spot?
Any help with this would be much appreciated.
Thanks,
Aaron