Displaying a Web Site in an IFrame

Posted by Johan Cyprich on 12 Apr 2007 | Tagged as: Programming

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.




Related posts:
    Web Friendly Colours Are Not So Friendly
    Who Is Hosting This?
    Scrollable CSS Regions
    Get the IP of Your Web Site

Share this post:

del.icio.us:Displaying a Web Site in an IFrame digg:Displaying a Web Site in an IFrame spurl:Displaying a Web Site in an IFrame wists:Displaying a Web Site in an IFrame simpy:Displaying a Web Site in an IFrame newsvine:Displaying a Web Site in an IFrame blinklist:Displaying a Web Site in an IFrame furl:Displaying a Web Site in an IFrame reddit:Displaying a Web Site in an IFrame fark:Displaying a Web Site in an IFrame blogmarks:Displaying a Web Site in an IFrame Y!:Displaying a Web Site in an IFrame smarking:Displaying a Web Site in an IFrame magnolia:Displaying a Web Site in an IFrame segnalo:Displaying a Web Site in an IFrame gifttagging:Displaying a Web Site in an IFrame

Follow Me:

Did you find this post interesting and useful? You can keep up to date on this blog by subscribing to my RSS feed, or you can have new posts sent to you by e-mail. You can also follow me on Twitter.


Trackback This Post | Subscribe to the comments through RSS Feed

Leave a Reply