This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes div position without calculating   the scrolling part Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "div position without calculating   the scrolling part" Watch "div position without calculating   the scrolling part" New topic
Author

div position without calculating the scrolling part

Nesrin aboud
Ranch Hand

Joined: Feb 08, 2010
Posts: 48
I need to know the position of a div inside iframe
I used the following java script code


Iframe width =400px
table inside the iframe width =1200px
when I try to get the position of the (overlayPanel.offsetLeft)) the alert shows (323)
but this is not what I need, I need the position without the scrolling part, I mean the position I am seeing relative to the Iframe width which should be (65)

(323) is the absolute position including the hidden part of scroll

any idea ?
 
Consider Paul's rocket mass heater.
 
subject: div position without calculating the scrolling part
 
Similar Threads
not able to get width and height of another html file inside html
Need help with Positioning Auto complete div using AJAX and Javascript
JavaScript Calendar Popup
How to set relative position for dialog box when scroll bars are activated?
problem as menu show behind of flash~ pls help