Enterprise Software

Fun with frames: Design a framed site

Find out how best to design a framed site.

By Paul Anderson
(updated 5/20/99)

Many modern site-management tools help you subdivide the pages that correspond to a particular frame, and help keep the link targets current. But even if you're maintaining your site by hand, it's easy to keep a framed site manageable, navigable, and accessible to visitors not using frames.

With common menu-and-content framesets, it often makes sense to split the navigation between the two frames. The main navigation menu in one frame loads a subindex page in another; each subindex targets itself, links to the other subindexes, and links to subpages that, in turn, link back to it. This way the only targeted links are in the menu frame.

This approach also lets you create navigation for browsers without frame support. Because frameset pages don't require a <BODY> element, frame-capable browsers ignore any <BODY> element you may put there. Nonframe browsers disregard the <FRAMESET> element but process the <BODY> and its contents. This characteristic means that you can create alternate nonframe content to apprise visitors that their browser isn't supporting your frames-based content. Or, with the targeted two-frame approach described above, you can recreate the menu frame without targets, providing full nonframe navigation.

<HTML><HEAD>
<TITLE>Welcome to my site!</TITLE>
</HEAD>
<FRAMESET cols="150,*">
 <FRAME name="menu" src="menu.html">
 <FRAME name="content" src="intro.html">
</FRAMESET>
<BODY>
Welcome to my site.<P>
<A href="intro.html">Introduction</A>
<A href="products.html">Products</A>
<A href="reviews.html">Reviews</A>
</BODY></HTML>

For the framed pages, the HTML 4.0 specification provides a <NOFRAMES> element to encase content that frame-capable browsers should ignore—for example, extra links that appear only in the absence of frames. But Navigator 4.0 and below do not support <NOFRAMES> in this manner, since Netscape originally introduced the tag to encase the alternate <BODY> on a frameset page.

Paul Anderson is senior producer and technical editor for CNET Builder.com.

Editor's Picks