3 4
If you're creating documents that will be viewed on line, you can take advantage of frames to organize your documents. Frames enable you to create areas for text on screen that allow you to divide a window into multiple areas so that you can show several documents at one time. Frames are most frequently used in Web page design. In fact, you've probably used frames while surfing the Web.
Web designers commonly use frames to create a number of window regions that show specific types of information. For example, frames are sometimes used to create a menu bar that contains links to main pages in a Web site. Users click links on the menu bar in one frame to display selected information in another "target" frame that serves as the main content area. Figure 23-3 shows a Web page that uses three frames—one title area frame, a navigation bar frame, and a body frame.
Figure 23-3. The Web page design on the left is based on a framework of three frame areas, as shown on the right.
The basic philosophy behind a frames page is that you create a page that defines how the window will be divided and then you specify the documents that should be displayed in each frame. When you upload a page that uses frames to a server, you must copy the frames page as well as the files that contain the frames' content to your server. When you save a document that uses frames in Word—whether you save the document as a Word document or a Web page—Word creates a separate file for the content in each area as well as a frames page that defines the view. Thus, the Web page shown in Figure 23-3 would consist of four files at a minimum—the title bar file, the navigation bar file, the main body text file, and the frames page file (which defines how the content files are displayed in the window). To reopen a document that uses frames in Word, you simply open the frames page document.
Note
You can add frames to a document using any of the following techniques:
For more information about creating Web pages, see Chapter 31, "Creating Professional Web Sites."
The tools you need to create and manage frames can be found on the Frames toolbar, shown in Figure 23-4. (You can also access frames options when you're working in a frames page by choosing Format, Frames.)
Figure 23-4. You can click buttons on the Frames toolbar to add and delete frames in a frames page.
Using the Frames toolbar, you can add a frame to the current document by clicking one of the position buttons: New Frame Left, New Frame Right, New Frame Above, or New Frame Below. After you add a frame, you can resize it by dragging the frame's border.
In addition to creating standard frames, you can have Word automatically generate a frame that contains links to the headings in your document. If your document uses built-in Word heading styles, you can click the Table Of Contents In Frame button (or choose Format, Frames, Table Of Contents In Frame) to create a linked table of contents in a left frame, as shown in Figure 23-5. You can format an automatically generated table of contents frame in the same manner you format other frames and documents.
Tip
Tip
Figure 23-5. The Tables Of Contents In Frame option enables you to quickly create a left frame that contains links to each heading in your document.
As with most constructs created in Word, you can control a frame's properties by configuring settings in a Properties dialog box. The two main areas of concern when you're working with frames are the content and the appearance of the frame itself. You can access content and appearance settings for frames by opening the Frame Properties dialog box. To do so, click the frame you want to format, and then click the Frame Properties button on the Frames toolbar or choose Format, Frames, Frame Properties. The Frame Properties dialog box is described in more detail in the following sections.
When you create a frames page, Word displays a different document in each frame. You might have to tell Word which document to display in which frame. (If you create a frames page from scratch, Word will automatically generate file names and documents for you.) You can specify documents to associate with a frame by configuring settings on the Frame tab in the Frame Properties dialog box, shown in Figure 23-6.
Figure 23-6. Using the Frame tab, you can perform a number of frame configuration tasks, including naming a frame and assigning a document to display in the frame when the frames page opens.
On the Frame tab, you can indicate which page to display in a frame by inserting the file's path and name in the Initial Page box. The file specified in the Initial Page box is the file that is displayed each time the frames page is opened. You can also select the Link To File check box to ensure that the document used in your frames page is updated each time the Initial Page file is changed.
In addition to specifying which file is initially displayed in a frame, you can assign a name to each frame. When you use frames, the frames must be named so that you can refer to specific frames when you create hyperlinks. For example, the Frame tab shown in Figure 23-6 specifies that the intro.html file is displayed in a frame named body. The Introduction hyperlink in the navigation frame in Figure 23-3 is configured to open the intro.html file in the frame named body when the hyperlink is clicked. The frames page shown in Figure 23-3 contains frames named title, body, and nav (short for navigation bar).
To learn more about creating hyperlinks and specifying frame targets, see Chapter 31, "Creating Professional Web Sites."
Note
Some of My Frame Pages Are Missing
If you find that a frame doesn't display an initial page when you open your frames page, you need to check the Initial Page setting in the frame's Frame Properties dialog box.
To display the Frame Properties dialog box, choose Format, Frames, Frame Properties and click the Frame tab. After you display the Frames tab, ensure that the path and file name in the Initial Page box is accurate and points to a valid file. Keep in mind that whenever you rename a file that's referred to in a frames page, you must modify the frames page's Frame Properties settings as well.
The remaining frame parameters you can configure on the Frame tab are the frame's height and width. You can assign height and width measurements in the Height and Width boxes and use the Measure In drop-down lists to specify whether the measurements are a percentage of the screen size, a fixed size in inches, or relative to the other frames, as follows:
Frequently, you'll find that your document uses a combination of Percent, Inches, and Relative settings. Fortunately, if you arrange your document by dragging frame borders, Word will automatically configure your frame size settings for you.
In addition to controlling which documents are displayed in frames and assigning sizes and names to frames, you can control frame borders. To access frame border properties, follow these steps:
Figure 23-7. The Borders tab in the Frame Properties dialog box provides settings you can use to specify how frame borders appear in the current document.
The settings available on the Borders tab are listed here:
As you configure border settings, notice that the preview box shows how your borders will appear. When you finish configuring border settings, click OK to apply the settings to the current document.
If you decide to modify a frames page, you can easily delete a frame. Remember, when you delete a frame, you delete only the frame in the frames page—you don't delete the file that contains the content that is displayed in the frame. To delete a frame, click the frame, and then click the Delete Frame button on the Frames toolbar or choose Format, Frames, Delete Frame.
Caution