Webmaster

HTML : Frames
Contents ]
Jérôme Versavel

The Frameset Document

Time to get down to the nitty gritty! The frame layout is defined in one file called frameset document which differs from a normal HTML document.

A simple example:

<FRAMESET COLS="20%,80%">

[...]

</FRAMESET>

The previous <FRAMESET> tag defines two vertical frames. The first one takes up 20% of the browser window, and the second extends over the remaining space on the righthand side, i.e. 80% of the window.



Figure 1: Our frameset rendering

The <FRAMESET> tag accepts two attributes for frame definition:

  • COLS, for vertical frames.

  • ROW, for horizontal frames.

In both cases the frame sizes are given as parameters with separating commas, either in pixels or in percent, as in the previous example.

Allocating the remaining window space. The character * can be specified for a frame so it is allocated all the free space left after the preceding frame definitions.



  1   2   3   4   5   6   7