|
Creating Frames
Frames are a way of dividing your browser window so it can hold more than one
logical page. When you create a framed site, the page has a URL, and then each frame
within the page has its own URL. Before adding frames to your framed page, you need
to create a master frame document. Instead of the <BODY> element, you create a
<FRAMESET> element.
The content of the FRAMESET element are:
FRAMESETs, FRAME, and NOFRAMES.
The attributes of the FRAMESET element are:
rows This is used to indicate the widths of the rows in order from top to bottom.
The default value for this is 100%. The width can be specified in pixels, a percentage of the browser
window, or a relative width.
cols This attribute indicates the width of columns in order from left to right.
It uses the same measurements as rows.
border This attribute creates a border between frames.
Here are some examples:
Rows only
<FRAMESET rows="20%, 80%"
....FRAME element
....FRAME element
</FRAMESET>
Columns only
<FRAMESET cols="100, *"
....FRAME element
....FRAME element
</FRAMESET>
(The asterisk * tells the browser to use the rest of the space for the second column)
Both rows and columns
<FRAMESET rows="20%, 80%" cols="100, *"
....FRAME element a1
....FRAME element a2
....FRAME element b1
....FRAME element b2
</FRAMESET>
|