homepage Welcome to WebmasterWorld Guest from 50.17.162.174
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Page Height/Width for NN6
Aelfwine




msg:577636
 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?

 

MikeFoster




msg:577637
 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.

Aelfwine




msg:577638
 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.

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

MikeFoster




msg:577639
 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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved