Building HTML Frames: Part II
2.Sizing the frames
There are three methods of sizing your frames:
The following examples show you how to size your frames using the three methods. In general, the browser window is divided into two frames or columns. The first frame takes up 1/4 of the screen width, and the second one takes up 3/4 of the screen width. The first example assumes that the width of the browser window is 600 pixels. Because we don't know exactly what size of visitor's browser window is, so it's best to use the percentage values and the relative scaling values for sizing our frames. You can, of course, divide the browser by rows using the ROWS attribute.
Example1: Using absolute values.
<FRAMESET COLS = "150, 450">
<FRAME SRC = "menu.html">
<FRAME SRC = "info.html">
</FRAMESET>
Example2: Using percentage values.
<FRAMESET COLS = "25%,75%">
<FRAME SRC = "menu.html">
<FRAME SRC = "info.html">
</FRAMESET>
Example3:
Using relative scaling values.
<FRAMESET COLS = "*, 3*">
<FRAME SRC = "menu.html">
<FRAME SRC = "info.html">
</FRAMESET>
3.Providing the alternative way for non-framed browsers
If the browser doesn't support the frames, you can provide
another alternative way to inform visitors that their browser doesn't support frames.
Example:
<FRAMESET COLS = "*,
3*">
<FRAME SRC = "menu.html">
<FRAME SRC = "info.html">
</FRAMESET>
<NOFRAME>
Sorry! You will need
Netscape 3.0 or higher to visit this site!
or your alternative HTML goes here.
</NOFRAME>
If the browser doesn't support frames, then it just ignores the <FRAMESET> tag and displays whatever within the <NOFRAME> </NOFRAME> container. Likewise, a browser that supports frames will ignore the text within the <NOFRAME></NOFRAME> tags.You can always put the <BODY> </BODY> tags between the tag pair <NOFRAME> </NOFRAME>.