homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

Page Height/Width for NN6

 12:01 pm on Sep 5, 2001 (gmt 0)

I've got a problem that I hope someone here can help me with.
I'm showing a page from another site in an IFrame/ILayer. The included page lets the parent know its dimensions by calling a function from the parent with its height and width as parameters. This works fine in IE (using document.body.scrollHeight,document.body.scrollWidth). I tried using document.body.offSetHeight/Width for NN6, but although the height was acceptable, the width was way off.
Any suggestions?



 2:55 pm on Sep 5, 2001 (gmt 0)

Hi Aelfwine,

I think this is a known bug... read about it at a mozilla newsgroup. I think it has to do with whether or not margin and padding is included in the measurement.

Try document.width and document.height in NN4+ including NS6.


 11:13 am on Sep 6, 2001 (gmt 0)

Hi Mike,

I tried using document.width (which gives me the same value as document.body.offsetWidth) and window.innerWidth which gives me the same value plus 16. The funny thing is that it is giving me the value of the width of the iframe and not itself. IE's scrollWidth gives me the correct width plus 20 (scrollbar width?) only if it is >= the width of the iframe, otherwise it gives me the width of the iframe like NS6. It seems that NS6 only looks at the container when it comes to width.

I'm impressed with your work at Cross-Browser.


 7:46 pm on Sep 6, 2001 (gmt 0)

Hi Aelfwine, Thanks!

Sorry I can't be any more help... This is a topic that I need to do more testing on.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved