|
This code will only work on Microsoft Internet Explorer 5.5+, Mozilla Firebird, and Netscape 7 (as far as I know). After we learned how to create an iframe with a height of 100%, I'll show you how to create an iframe that gets its height according to the contents of the page that is in it. That way if you have a long page inside your iframe then your iframe will be tall enough so that you can scroll the external page without scrolling the iframe itself. You may find this useful in certain cases but I recommend not using it unless you really need it (since you may miss the entire point of using an iframe in the first place). The CodeIn the head of your document enter the following JavaScript code:
and in the body create the iframe tag:
If you decide to use this code all I ask is that you . Thanks to all the people who sent me their comments on this code and helped me improve it :o) |