SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Threaded View

  1. #1
    if ($zee == "Guru") { $zee--;}
    Join Date
    Nov 2005
    Location
    Karachi - Pakistan
    Posts
    1,134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting Layer's Top and Left

    Hi

    Friends i have a css style with the following parameters.

    #map{
    float: left;
    width: 451px;
    height: 307px;
    padding: 7px;
    }

    then i have a DIV with the ID of "map"

    now i want the browser to show me the TOp and LEFT parameters of the DIV when the page is shown in the browser.

    like i want to do like this :

    <script>
    var mapTop = document.getElementById( "map").style.top;
    var mapLeft = document.getElementById( "map").style.left;
    alert(mapTop);
    </script>

    but it a BLANK ALERT BOX

    plz help
    Last edited by zeeshanhashmi; Apr 5, 2007 at 07:05. Reason: correction


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •