testframe.html:
<html>\r\n <body>\r\n <iframe id="daFrame" src="testcontent.html" height="100px" width="100%" frameborder="0" marginheight="0" marginwidth="0"></iframe>\r\n <div style="border: solid 3px green;" width="100%">The bottom content.</div>\r\n </body>\r\n</html>
\r\n\r\ntestcontent.html:
<html>\r\n <head>\r\n <script type="text/javascript" language="javascript">\r\nfunction foo()\r\n{\r\n window.parent.document.getElementById("daFrame").height = document.getElementById("daBody").offsetHeight + 16;\r\n}\r\n </script>\r\n </head>\r\n <body id="daBody" onLoad="foo();">\r\n1<p>\r\n2<p>\r\n3<p>\r\n4<p>\r\n5<p>\r\n6<p>\r\n7<p>\r\n8<p>\r\n9<p>\r\n10<p>\r\n </body>\r\n</html>
\r\n\r\nLoad testframe.html. In Firefox, the frame resizes on load to the size of the content. In IE, it doesn't.