[thelist] iframe tag cross-platform problems

Hardacker, Andrew Andrew.Hardacker at Compuware.com
Tue Mar 19 15:16:01 CST 2002


<snip>
Thanks for the tip... this fixed IE on Windows (somewhat) but broke IE Mac
and Netscape 6 is not displaying correctly.

http://averra.com/web_examples/iframes_tst1.htm

Any other suggestions? or is my next best bet to add that other table cell
filled with the style of whatever frame is called up in the area? (each page
has unique color)
</snip>

Janice,

One omission and one error on my part:
1. Add height="100%" to the table containing the iframe.
2. References to "parentElement" should be "parentNode" (both seem to work
in IE, only parentNode in Netscape!)

Which still doesn't eliminate to extra space below the iFrame in Netscape.
So I fooled around with this some more (including a stab at using
getComputedStyle in Netscape) but couldn't find a simple solution that
worked in IE and Netscape. I did notice (Netscape) that if there is a lot of
content in the upper tr or if you set the height of the content tr to 600,
enough to push the iframe off the page, the extra space tends to disappear!

This javascript function does require that your users have javascript on,
and if you think they resize their windows with regularity, you'd have to
consider adding an onresize call to the sizing function.

You should also check the tr/td/colspan values -- they don't quite jibe.

As for recommendations, I'd step back and say stay away from the height
attribute in this situation and consider abandoning the table-based layout
for CSS but I realize you may be required to support browsers where tables
are the only viable answer. (Is that an acceptable excuse to keep tables?)

Sorry I don't have the magic bullet.

Andy
http://hardacker.com/



The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.




More information about the thelist mailing list