Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Javascript
knowing where a block element is within the client element?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Thomas 'PointedEars' Lahn, post: 4958260"] That's unlikely. The `div' or `img' element would then be have to be positioned absolute or floating with CSS. If it was not positioned absolute and not floating you could simply insert the new element node right after the target element node: if (target.nextSibling) { target.insertBefore(newElementNode, target.nextSibling); } else { target.parentNode.appendChild(newElementNode); } How you can obtain the `target' reference depends on your markup, and how you can obtain the `newElementNode' reference depends on the element type ("tag name"). Parse error. Finding out the rendering position of an element is not a trivial task (and, from what I can see, probably way over your head) as there are many aspects to watch for, including but not limited to different box models. If you really need that (see above), you should search the archives for it, see <[URL]http://jibbering.com/faq/[/URL]> or acquire the necessary knowledge by reading much more documentation than you did for this question. PointedEars [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Javascript
knowing where a block element is within the client element?
Top