Basic Frame Elements
Frames have two basic elements, columns and rows, which break the browser window up horizontally (columns) and vertically (rows). You can manipulate these as to width, size, alignment, and placement within the browser window. They can be divided with rules and/or scroll bars. A frame can allow you to display one piece of data (the menu bar, for example) constantly, while still allowing the rest of the data (the main page of info) to scroll down.
You enable frames with a special frame document. Its contents do not get displayed. Rather, the frame document contains extension HTML tags that tell the browser how to divide its main display window into discrete frames, and what documents go inside the frames.
The individual documents referenced and displayed in the frame document window act independently, to a degree; the frame document controls the entire window. So, for instance, the browser's ``Back'' and ``Forward'' buttons don't work for an individual frame, but links the entire frame document with others you viewed previously.
You can, however, direct one frame's document to load new content into another frame. That's done by attaching a name to a frame and targeting the named frame with a special attribute for the hypertext link a tag.
A few things to note about frames: First, the order in which Netscape fills the frames in a frameset goes across each row. Secondly, frame 4 sports a scrollbar because we told it to, even though the contents may otherwise fit without scrolling. (Scrollbars automatically appear if the contents overflow the frame's dimensions, unless explicitly disabled with a special attribute in the frame tag.)
Another item of interest is the name attribute in one of the frame tags. Once named, you can reference a particular frame as where to display a hypertext-linked document. To do that, you add a special target attribute to the anchor (a) tag of the source hypertext link. For instance, to link a document called ``menu.html'' for display in the example window left frame, which we've named ``BottomLeftFrame'', the anchor looks like this:
<a href="menu.html" target="BottomLeftFrame">
It is likely that some users with browsers that don't support frames will try and view your frame documents. That's why each of your key frame documents should provide a backdoor to your HTML document collection with the noframes tag. Frame-compatible browsers display your frames; non-compatible browsers display the alternative noframes content.
Structure and Appearance
the following frame stucture is what was used to build the page you are presently looking at,
with a menu bar (BottomLeftFrame), a header bar (TopFrame), and the main body of data (
BottomFrame).
<FRAMESET Rows="75,*" BORDER="0">
<NOFRAMES>
To view this document, you need a frames-compatible browser such as
Netscape Navigator or Microsoft Internet Explorer.
</NOFRAMES>
</FRAMESET>
Resources/Guides
The Art of
Frames
A tutorial
Sharky's Netscape Frames Tutorial