Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Manchester, UK
    Thanked 1 Time in 1 Post

    div layer positioning


    I am trying to make a right click menu (DIV layer) inside an iFrame... I can get it to position ok when the frame is on the left of the screen, but I am having problems with the co-ordinates, as the mouse click is relative to the iFrame, but the DIV layer positions itself in the main window.

    I need a calculation based on the iframe width, height and the client window width and height - but I dont know where to begin!!

    here's an example: www.mattfacer.com/test.htm

    if you look at the source code you'll see that I get the client height etc, but dont know where to begin with a calc..

    any help is appreciated!

    Edit: www.mattfacer.com/test2.htm - there's an example of the menu when the iframe is not on the left....
    Last edited by homerUK; 06-20-2004 at 09:06 PM.


Posting Permissions

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