Hi to all, I have the follwoing challenge:
I need to set floating elements in a document and its position should be relative to another element in the document. I'll explain, lets says I have the below document, an html page with an image, I need to set the position of the DIV element "10,10"(x, y), relative to the image(or another element), is this posible to do?
In the below example I can create a floating DIV, but I don't know how to get the x and y of the element and then set the floating DIV relative to it.
Thanks in advanced
<html>
<head>
</head>
<body>
<img id="myPic" src="web.gif" width="50" height="50"/>
<div id="floatdiv" style=" position:absolute; width:200px;height:50px;left:50px;top:50px;
padding:16px;background:#FFFFFF; border:2px solid #2266AA">
This is a floating DIV
</div>
</body>
</html>