Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: DIV Position

  1. #1
    New to the CF scene
    Join Date
    Jan 2004
    Location
    São Paulo
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question DIV Position

    Can I get the layer top and left positions without put into the tag?
    Is there anyway to calculate it?

    Tks
    Marcel

  • #2
    Regular Coder
    Join Date
    Oct 2003
    Location
    SC
    Posts
    936
    Thanks
    0
    Thanked 0 Times in 0 Posts
    is this what u are looking for?


    in the head:
    <style>
    div{
    position: absolute;
    top: 30;
    left: 44;
    }
    </style>

    then in the body:

    <div>someting 44 px form the left </div>


    and if you want the to find the position with js then use .offsetTop or .offsetLeft



  •  

    Posting Permissions

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