WWW
set the frame

To create frames on a Web page, you need the <FRAMESET> tag, which defines the divided areas, and the <FRAME> tag, which brings up the HTML pages that reside within the divided areas. The <FRAME> tags nest inside the <FRAMESET> tags, which follow the <HEAD> tags. (<FRAME> tags have no end tag, but <FRAMESET> tags do.)

To set up the number of frames in a frameset, use the ROWS or COLS attribute of the <FRAMESET> tag. These attributes can take whole numbers (in pixels), percentages of the screen, or relative scaling values; the number of frames is determined by the number of values assigned to the attribute. For example, this command sets up two frames side-by-side:

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

The frame on the left takes up 20 percent of the screen, and the frame on the right takes up 80 percent of the screen, no matter how big or small the screen gets.

The following code takes a different approach. The top frame is set with an actual pixel value, while the bottom frame uses the * (asterisk) delimiter, which fills in the remaining space in the browser window:

<FRAMESET ROWS="80,*">

Because you don't know the exact dimensions of your viewers' browser screens, it's much smarter to use the asterisk delimiter than to use pure pixel values. Depending on the content of the frames, this approach may also work better than establishing percentages of the screen. If you've designed the content of one frame to be a certain size (for a graphical toolbar, for instance), it makes sense to ensure its size with a set pixel value.

Of course, nothing appears onscreen until you actually set up the frames within the frameset. You need one <FRAME> tag for each frame, and each tag points to its own HTML document or script with the familiar SRC attribute:

<FRAMESET COLS="20%,80%">
<FRAME SRC="toolbar.html">
<FRAME SRC="index.html">
</FRAMESET>
 
 
 
 
show me!



Vogel Publishing s.r.o.