Hi
You'll need absolute positioning on the layer you wish to work with, but you
can use a relative positioned layer (make it transparent, 1x1) to calculate
where to put the absolute layer.
The code will be something like: (non dynlayer)
Include the relative layer in the table:
...<td><div style="position:relative" name="refdiv"></div></td>...
In netscape you can read the page-relative coordinates of a layer with:
refdiv.pageX and refdiv.pageY
In explorer, you'll need these functions to get the coordinates:
posLeft(refdiv) and posTop(refdiv)
function posLeft(e) {
if(document.layers) return(e.pageX);
var i=e.offsetLeft;
if(e.offsetParent!=null) i+=posLeft(e.offsetParent);
return(i);
}
function posTop(e) {
if(document.layers) return(e.pageY);
var i=e.offsetTop;
if(e.offsetParent!=null) i+=posTop(e.offsetParent);
return(i);
}
If you need the width and heigh to be relative too, you can include a
relative positioned layer for each corner of the area the layer should span.
Hope that helps :-)
> ---
> Jakob Veje Hansen - mailto:[EMAIL PROTECTED]
> WM-data eSolutions
> Tel: +45 8744 4619 - Mobil: +45 2169 0361
> http://www.wmdata.dk
-----Original Message-----
From: Mike Burgh [mailto:[EMAIL PROTECTED]]
Sent: 29. oktober 2001 02:34
To: [EMAIL PROTECTED]
Subject: [Dynapi-Help] Viewport/Scrollpane and Inline Layers
Hi all,
I am trying to generate a content scroll effect, much like : (ie only)
However, the problem I am facing is how to do this using either inline
layers, or relative postion layers as the final page will be centered in the
brower, and from what I can see this makes using STYLE="position: absolute"
Please help me
Mike
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help