Print Page | Close Window

position: absolute;

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=15703
Printed Date: 29 March 2026 at 4:24am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: position: absolute;
Posted By: puggan
Subject: position: absolute;
Date Posted: 03 July 2005 at 4:48am
Hi!
 
I got all IFrames messed up,
when i put the editor in a div whit: style="position: absolute;"
 
Test it:
 
Code:
  http://www.aspsidan.se/code/?c=4493&error=21 - http://www.aspsidan.se/code/?c=4493&error=21



Replies:
Posted By: puggan
Date Posted: 04 July 2005 at 6:45am
the error is in:

//Iframe top offset
function getOffsetTop(elm)
{
var mOffsetTop = elm.offsetTop;
var mOffsetParent = elm.offsetParent;
while(mOffsetParent)
{
mOffsetTop += mOffsetParent.offsetTop;
mOffsetParent = mOffsetParent.offsetParent;
}
return mOffsetTop;
}

this only works as long as all offsets is relativ to its parent.
if not, like in my case, it adds the absoulutepositions of the parents.

how do i chande this:
mOffsetParent = mOffsetParent.offsetParent;
i want it to be like this:
if (???)
mOffsetParent = mOffsetParent.offsetParent;
else
mOffsetParent = null;

where the if (???), check if the cordinate in mOffsetParent are not absolute.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net