Viewport Dimensions

"Gale, David" <[email protected]> Wed, 6 Sep 2006 15:59:33 -0400
Newsgroups gmane.comp.web.dom.wdf
Message-ID <[email protected]>
I'm trying to create a pseudo-popup on my page.  My approach (as
intended, not as functioning now):

1) Create a div that's as tall & as wide as the entire page, set to 90%
opacity, to make it clear what's being worked on without totally hiding
the current data.
2) In that div, create a div that's centered horizontally & vertically
in the visible section of the page, which contains the popup controls.

In Firefox, I seem to be able to create the filter div correctly, but
the same div in IE is taller than need be when the actual page is
smaller than the viewport (creating vertical scrollbars when it
shouldn't); if the page is longer than the viewport, it seems to work
correctly.  I'm using the maximum of document.body.scrollHeight and
document.body.offsetHeight.

I'm also not 100% confident in how to position the controls block
vertically; it seems that I need to get how far the window is scrolled,
and use that to set the block's top, but that would also require a hook
on window.onresize and window.onscroll to maintain the height.  Is there
a simpler way (that is, one that lets the CSS engine do most of the work
for me)?

Thanks,
-David


Unsubscribe
[email protected]

List info
http://www.quirksmode.org/dom/list.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wdf-dom/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/