Displaying a Web Site in an IFrame
In an earlier post, I demonstrated a simple technique to create a scrollable region on a web page using CSS. While this is a good way to display static text, it doesn’t work for displaying another web page. The inline frame (IFrame) element in HTML will allow you to do this.
IFrames are typically used for displaying content from another page, such as an advertising banner. You can use frames to accomplish this, but frames are not good for use in cross-browser applications.
The following is an example of the code and output using the IFrame element. You need to specify the size of the window and the web page that will be displayed. The text in between iframe tags is what will appear on web browsers that can’t display the iframe contents.