You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, March 12th 2003, 3:15pm

konq problem with css margins and offset calls

Im trying to develop a set of javascript routines to control DHTML elements on webpages and am running into a problem:

When I try to obtain the placement of an element on a webpage by recursivly adding the offsetTop and offsetLeft values of the elements parents, the final x,y values area always off by the amount of the margin in the body of the document.

For instance if the document body css is:

<code>
BODY {
margin-left : 0px;
margin-right : 0px;
margin-top : 38px;
margin-bottom : 0px;
background-color : #cde7f7;
}
</code>
and the elements true x,y coordinates are:
<code>100,100</code>

I end up with an x,y value of:
<code>62,100</code>

Is this intentional or a bug and if its a bug where do I report and track it?

Also... how would I identify a Safari browser? Would its user agent still be "Konqueror"?

Thanks!!