positioning a DIV right in the middle of the screen

Discussion in 'Javascript' started by laredotornado@zipmail.com, Feb 14, 2007.

  1. Guest

    Hello,

    I'm creating a dialog box using a DIV. When the DIV opens, I would
    like it to appear in the middle of the browser window, even if the
    user has scrolled down a little. How would I calculate the top and
    left coordinates in order to do this?

    Thanks, - Dave
     
    , Feb 14, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. brucie
    Replies:
    4
    Views:
    13,302
    Toby A Inkster
    Jul 10, 2004
  2. Thierry Lam
    Replies:
    5
    Views:
    1,041
    Thierry Lam
    Sep 27, 2006
  3. Gerry Wolff
    Replies:
    1
    Views:
    432
    Beauregard T. Shagnasty
    Apr 5, 2008
  4. Biranchi Narayan Panda
    Replies:
    1
    Views:
    2,779
    Alexey Smirnov
    Feb 17, 2010
  5. Fokke Nauta
    Replies:
    20
    Views:
    12,998
    123Jim
    Jan 26, 2011
Loading...

Share This Page