beautypg.com

Nested framesets – Adobe Dreamweaver CC 2015 User Manual

Page 146

background image

139

Layout and design

Last updated 6/3/2015

For a full treatment of why you should not use frames, see Gary White’s explanation at

http://apptools.com/rants/framesevil.php

.

The most common use of frames, if you do decide to use them, is for navigation. A set of frames often includes one
frame containing a navigation bar and another frame to display the main content pages. Using frames in this way has
a couple of advantages:

• A visitor’s browser doesn’t need to reload the navigation-related graphics for every page.

• Each frame has its own scroll bar (if the content is too large to fit in a window), so a visitor can scroll the frames

independently. For example, a visitor who scrolls to the bottom of a long page of content in a frame doesn’t need to
scroll back up to the top to use the navigation bar if the navigation bar is in a different frame.

In many cases, you can create a web page without frames that accomplishes the same goals as a set of frames. For
example, if you want a navigation bar to appear on the left side of your page, you can either replace your page with a set
of frames, or just include the navigation bar on every page in your site. (Dreamweaver helps you create multiple pages
that use the same layout.) The following example shows a page design with a framelike layout that doesn’t use frames.

Poorly designed sites use frames unnecessarily, such as a frameset that reloads the contents of the navigation frames
every time the visitor clicks a navigation button. When frames are used well (for example, to keep navigation controls
static in one frame while allowing the contents of another frame to change), they can be very useful for a site.

Not all browsers provide good frame support, and frames may be difficult for visitors with disabilities to navigate, so if
you do use frames, always provide a noframes section in your frameset, for visitors who can’t view them. You might also
provide an explicit link to a frameless version of the site.

Nested framesets

A frameset inside another frameset is called a nested frameset. A single frameset file can contain multiple nested
framesets. Most web pages that use frames are actually using nested frames, and most of the predefined framesets in
Dreamweaver also use nesting. Any set of frames in which there are different numbers of frames in different rows or
columns requires a nested frameset.