Lesson 9
Frames
Introduction to framesFrames are supposed to be on their way out. Its all part of the move to separate content from presentation. However, in the meantime, go first to the Page tutor tutorial on frames. You will also find there a neat trick to change more than one frame at a time, so you can change both the navigation frame and the content frame.
Example
In Normist (V.11) I used four frames. There is a title or header frame. Below this is a navigation frame and a content frame and at the bottom is a footer frame. E.G.
NOTE. Since this lesson was written, I have gone back to not using frames. Instead you can use an external CSS file.
To achieve this effect you need an index page which contains:-
<frameset frameborder="0" framespacing="0" rows="65,*,100">
<frame title="Welcome to Assynt" src="top.htm" scrolling="no" noresize="noresize" />
frame title="menu and information" src="index1.htm" name="middle" />
<frame title="date and navigation instructions" src="bottom.htm" scrolling="no" noresize="noresize" />
<noframes>
<body>
</body>
</noframes>
</frameset>
Interpretation of the HTML
The first line above splits the window in the browser into three rows. The first (top) is 65 pixels deep, the last (bottom) is 100 pixels deep and the remainder is allocated to the middle row. '*' meaning an elastic quantity that depends on the height of the users window.
The next three lines specify what goes into these rows. The attributes include the title, the source (an HTML file), and bans on scrolling and the ability to resize for the top and bottom rows.
In other applications, the middle frame might be replaced with a frameset dividing the frame into two columns. Thus framesets can be nested.
In this application, however, it is the HTML file "index1.htm" that includes a frameset to give the two columns. This method allows both frames to be changed in one link. The name attribute provides a target to place a frame in a link.
The 'noframes' tag allows the web author to provide information to users whose browsers can not handle frames. The text for this must be within body tags.
Finally, comes the frameset off tag.
| Previous Lesson |