Creating Frames and Framesets

Create the Frameset:

You now have two frames and three documents: the main frameset file plus a new, untitled document in each of the two frames. A border appears around the entire document in the Frame inspector when a frameset is selected. Notice that the Frame inspector shows two areas, identified as leftFrame and mainFrame.

Take a look at the frameset Property inspector:

In the HTML Source inspector, notice that the frameset HTML consists of the opening and closing FRAMESET tags and any FRAME tags in between.

If you click in the right area of the Frame inspector, the second FRAME tag is highlighted.

Creating a Nested Frameset

A nested frameset is a frameset within the main frameset that consists of two rows. To create a nested frameset:

In the Object palette in the Frames panel, select the Insert Top Frame icon or

Choose Modify > Frameset > Split Frame Down.

The right frame splits into two separate frames, creating a second frameset within the main frameset.

Notice that the nested frameset also contains a border outline. There are now three frames, two framesets, and four documents in your window.

Setting Frame Sizes (Relative and Exact Size)

Before you begin filling your frames with content, it's a good idea to add some more details about the frames to your frameset file. The sizes of the frames aren't quite what you want yet; to resize them, you'll either need to drag the frame borders around or enter values into the Property inspector. The former method is great for roughing out frame positions, but the latter method offers the opportunity to set a precise, fixed size for a frame or to designate the size as relative to the browser window

You set frame properties by selecting the frame and entering values in the frame Property inspector. You set frame sizes, however, by selecting the frameset and entering values into the frameset Property inspector. This is because size information is stored in the FRAMESET tag as you can see in the HTML Source inspector.

To set the size of each of the frames:

Setting Frame Borders

You may have noticed that the completed frameset did not have borders. Borders are not necessary because the background color in each frame makes the boundaries between frames clear. Border properties, like frame sizes, are set in the frameset Property inspector. Border settings for the main frameset also affect all nested framesets.

To Remove Frame Borders:

Setting Frame Properties

Next you will specify properties and a name for each frame in the frameset. Since each frame will play a different role in the frameset, each will have different properties.

This makes scroll bars appear if the content exceeds the available screen space. Generally, vertical scroll bars are fine in navigation and main content frames, but you should design your content so that horizontal scroll bars never appear. (It's very difficult for users to read text if they have to scroll in two directions.) To avoid horizontal scroll bars, make sure that the content will wrap naturally or that it will fit in the frame without wrapping even when vertical scroll bars appear. (This could mean that an image in a 150-pixel-wide frame might have to be 120 pixels or narrower.)

Setting the Properties of the Top Frame:

Setting the Properties of the Bottom Right Frame:

Opening an Existing Document Inside a Frame

The easiest way to populate a frame is to open an existing document inside it. To do this with the your
Cafe site, you'll create and save the document that goes in the header frame.

To Open the Header File in the Header Frame:

Create the Content for Navigation.html:

To Create the Content for Main.html: