Creating a Frameset


Dreamweaver comes with several predefined framesets that include the most commonly used frame layouts. For example, the HomeCook. info site needs a top frame for the masthead, a left frame for the navigation, and a right frame for the changing content. Dreamweaver has a predefined frameset that fits these specifications.

If you like, you can instead create a custom frameset from scratch, by manually drawing frames into a page. Dreamweaver gives you the tools to create and resize frames .

To use a predefined frameset:

1.
Choose File > New.

or

Click the Framesets link in the "Create from Samples" section of the Dreamweaver Start Page.

The New Document dialog appears.

2.
Select Framesets from the Category list (if you used the Start Page, this was already done for you).

3.
In the Framesets column, select a layout.

For example, you can choose Fixed Top, Nested Left ( Figure 11.2 ). This layout uses a frameset with two rows. A second frameset with two columns is nested in the bottom row.

Figure 11.2. Dreamweaver's New Document dialog has numerous predefined Framesets.


4.
Click Create.

Dreamweaver opens the new framed window, and the Frame Tag Accessibility Attributes dialog appears, if you have your Preferences set for Frames Accessibility ( Figure 11.3 ). (You do have Preferences set for Frames Accessibility, right?)

Figure 11.3. The Frame pop-up menu lets you select each frame to give it a title attribute.


In the dialog, select each frame from the Frame pop-up menu and give a descriptive title attribute to each frame by typing it into the Title field.

In Figure 11.3, we replaced the default suggestion for mainFrame with the more descriptive title "content." A good title for the topFrame is "site identification." A good title for the leftFrame is "site navigation." Remember, title attributes help users whose browsers can't display frames understand and navigate your site, so be informative.

Tip

  • You can also create a frameset using the Layout category of the Insert Bar. Use the Frames button there to choose the frameset layout you want ( Figure 11.4 ).

    Figure 11.4. The Insert Bar has numerous predefined framesets as well.


To create a custom frameset:

1.
Create a new HTML document by choosing File > New, then double-clicking Basic Page in the resulting New Document dialog.

2.
Choose View > Visual Aids > Frame Borders ( Figure 11.5 ).

Figure 11.5. One of the Visual Aids you can view is Frame Borders.


This turns on a dotted border around the frame edges.

3.
Click and drag the dotted border to insert frames. The cursor changes to a double-headed arrow cursor to drag ( Figure 11.6 ).

Figure 11.6. The dotted line around the outside of the document window indicates the frame borders.


If you drag from the top or bottom, the document splits horizontally. If you drag from the left or right, the document splits vertically. If you drag from a corner, the document splits into four frames.

Tip

  • You can also add frames to a frameset by choosing Modify > Frameset > Split Frame Left, Split Frame Right, Split Frame Up, or Split Frame Down.


To delete a frame from a frameset:

1.
Choose View > Visual Aids > Frame Borders (Figure 11.5).

2.
Click and drag the dotted border to the edge of the document window to delete a frame.

or

Click on the frame border and drag it until it meets another frame border.

Frame Name vs. Frame Title

Frame navigation won't work unless you can point to a frame by name. (See "Targeting Frames with Links" a little later in this chapter.) Every frame needs a name. Dreamweaver assigns a default name based on location or assumed purpose, for example, topFrame , leftFrame , mainFrame .

The Frame name displays at the left on the Property Inspector when a frame is selected. If you don't like Dreamweaver's choice of name, you can type a different one in the Frame name field. If you use a name of your own choosing, there are a few rules:

  • No spaces are allowed in a frame name.

  • The name must begin with a letter or number.

  • It's okay to mix uppercase and lowercase letters .

Frame names work behind the scenes to make the frameset function. They don't make any difference to your users.

Frame titles, on the other hand, do make a difference to at least some of your users. As we mentioned previously, the title attribute provides important identification and navigation help for users with certain types of browsers. Dreamweaver doesn't presume to suggest a title attribute text for you. Instead, it prompts you for it in the Frame Tag Accessibility Attributes dialog. This is your one chance to enter title information if you work only in Design view.

The rules are different for title attribute text. More than one word, spaces, even sentences can go into a title attribute. For example, the title attribute for the topFrame might be something like "Site identification and a link back to the home page."

Look at the markup for topFrame to see where name and title are used:

[View full width]
 
[View full width]
<frame src="masthead.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="site identification and a link back to the home page" />

Everything in that code snippet can be modified from the Property Inspector except title . That's why you need to grab your chance to write a great blurb for the title text when the Frame Tag Accessibility Attribute dialog prompts you for a title.





Macromedia Dreamweaver 8 for Windows & Macintosh Visual QuickStart Guide
Macromedia Dreamweaver 8 for Windows & Macintosh
ISBN: 0321350278
EAN: 2147483647
Year: 2005
Pages: 239

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net