adv banner
HTML and CSS  Home HTML and CSS Tutorials Inline Frames
rss

Inline Frames

Author: Depiction.net More by this author
Browse Pages: << <  5  6  7  8  9


Floating or inline frames enables a full page to be added inside another. Unlike PHP and SHTML, inline frames use a .html file as the embeded file and includes a scrollbar. However inline frames aren't supported by every browser. Netscape 4.x and Opera 5 for Macintosh don't support inline frames.

  1. Start off by typing <iframe src="embededpage.html", where embededpage.html is the page that will be shown in the inline frame when viewed in a browser.

  2. To name the embeded page, type name="depiction" and replace "depiction" with the name of the embeded page.

  3. Type width="200" height="300">. Replace the current dimensions with the dimensions of the new inline frame.

  4. Type the text that should appear if the browser doesn't support inline frames. Finally type </iframe> to complete the inline frame.

You should now have:

<iframe src="embededpage.html" name="depiction" width="200" height="300">Your Browser does not support inline frames.</iframe>

Tips:
  • The border can be removed by adding frameborder="0" after step 2. This helps the frame blend in with the rest of the page.
  • CSS can be used in the embeded page to customize the scrollbars so they don't stick out to much.

If done correctly, the inline frame should appear as below when viewed in a browser. (I removed the border.)



print this page tell a friend subscribe to newsletter subscribe to rss
Rate this Material: Bad 1 2 3 4 5 Excellent
Browse Pages: << <  5  6  7  8  9

Add comments to "Inline Frames"