Roots
Back

Iframes

What are Iframes?

Iframes are similar to frames in that they load a different page inside them, hence separating portions of your text and allowing them to scroll independantly while other content remains static. This is an effect you can reproduce with CSS, and it is better to do so where possible.

How to use Iframes

You will need to insert the following code in your page at the place you want to Iframe to appear;

<iframe src="url" name="name" frameborder="0 / 1" height="value / percentage" width="value / percentage" scrolling="auto / no / yes">

url - The full or relative address of the page to display withing the Iframe.
name - The unique name of the Iframe, by which you will identify it when creating links to load in it. You can have more than one Iframe on a page, with different names to distinguish them.
0 / 1 - Set the border off (0) or on (1).
value - The size in pixels of the width or height.
percentage - The size as a percentage of the containing element, of the width or height.
auto - Set scrollbars to appear when needed, and disappear when not needed.
no / yes - Set scrollbars to always off (no) or always on (yes).

To create a link which will load in an Iframe, write;

<a href="filename.html" target="name">Link Text</a>

name - The name you gave to the Iframe you want the page to load in.