Frameset
Frames are generated by three things: FRAMESET tags,
FRAME tags, and Frame documents.
A Frame Document has a basic structure very much like
a normal HTML document, except the BODY tags are replaced by the
<FRAMESET> and </FRAMESET> tags.
These describe the sub-HTML documents, or Frames, that will make up
the page.
Example Frame Document:
<HTML>
<HEAD>
<TITLE>
</TITLE>
</HEAD>
<FRAMESET>
</FRAMESET>
</HTML>
Two attributes the <FRAMESET> tags can take are
ROWS and COLS. Within the <FRAMESET> tags, you
can only have other nested <FRAMESET> tags,
<FRAME> tags, or the <NOFRAMES>
tag.
- ROWS="row_height_value_list"
- The ROWS attribute takes as its value a comma separated list of values,
which can be absolute pixel values, percentage values between 1 and 100
whose total must equal 100, or relative scaling values. The number of rows
is implicit in the number of elements in the list. A missing ROWS attribute
is interpreted as a single row.
- Syntax of value list.
value
- A numeric value is assumed to be a fixed size in pixels. This is the
most dangerous type of value since the size of the viewer's window can
and does vary substantially.
- value %
- A simple percentage value between 1 and 100. If the total is greater
than 100, all percentages are scaled down. If the total is less than 100,
and relative-sized frames exist, extra space will be given to them. If no
relative-sized frames exist, all percentages will be scaled up to match 100%.
- value *
- The value on this field is optional. A single "*" character is a
relative-sized frame and is interpreted as a request to give the frame all
remaining space. If there exists multiple relative-sized frames, the remaining
space is divided equally among them.
- COLS="column_width_list"
- The COLS attribute takes as its value a comma separated list of values
that is of the exact same syntax as described above for ROWS.
Examples:
1. <FRAMESET ROWS="20%,60%,20%"> - This tells the
browser to divide the window up into three rows, with the top and bottom
row each occupying 20% of the space, and allotting 60% of the viewing
space to the middle row.
2. <FRAMESET COLS="100,*"> - This tells the browser
to divide the window into two columns, the left column being 100 pixels
wide, and the second column getting all of the remaining space.