Reply
corresponding function to offsetTop/-Left for ie
Old 04-02-2006, 07:02 AM corresponding function to offsetTop/-Left for ie
Nikko's Avatar
Novice Talker

Posts: 9
Location: Norway
Trades: 0
Hello.

For a couple of weeks ago, I asked how to get the relative position of an element for using absolute divs and drop-downs. I got the answer offsetTop and offsetLeft, and it works awesome --- in firefox. So I need corresponding functions / properties which works in internet explorer and safari.

Thanks alot,
Niklas


Solved

Last edited by Nikko; 04-02-2006 at 10:09 AM..
Nikko is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 04-02-2006, 02:23 PM Re: corresponding function to offsetTop/-Left for ie
chrishirst's Avatar
Super Moderator

Posts: 26,470
Location: Blackpool. UK
Trades: 0
Both properties are part of the standard DOM so are in IE and Safari.

Make sure you are using a Full & Valid doctype to set the correct DOM in place.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | Crowded Nightclub? | Bits & Bobs
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-02-2006, 09:59 PM Re: corresponding function to offsetTop/-Left for ie
Super Talker

Posts: 144
Trades: 0
also take note that offsetTop and offsetLeft pertain to the parent element. so you would need to itterate through the node list to the body in order to get the true left or top position. a while loop can achieve this.
__________________
create.vibe
web development portfolio
createvibe.com is offline
Reply With Quote
View Public Profile Visit createvibe.com's homepage!
 
Reply     « Reply to corresponding function to offsetTop/-Left for ie
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.08821 seconds with 13 queries