How Frames WorkWhen you look at a framed site, you are actually seeing multiple pages ( Figure 11.1 ). You've seen the site in Figure 11.1 before, but not in frames. At first glance you might not notice the site is framed. But once you start scrolling you'll realize the difference. Notice the scrollbar in Figure 11.1. See how it starts about halfway down the side of the page? That's because there are actually three framed pages shown, and only the frame on the lower right has a scrollbar. Figure 11.1. The HomeCook. info site in a framed layout looks much like the other layout.
The arrangement of the individual frames is determined by the frameset document . The frameset document contains one or more frameset tags, which set up the number of frames, how they will be arranged, and which individual Web pages will be displayed when the page is opened for the first time. No matter how many frames a browser window displays, there is usually only one frameset document for a site. A Web page with three frames actually needs four separate documents to display correctly: the frameset document and the three individual documents that fill the three frames. A frameset divides a window into either columns or rows, but not both at once. Luckily, framesets can be nested , or put one inside another. A frameset of columns can be nested in a row of another frameset. Or, a frameset of rows can be nested in a column of another frameset. In Figure 11.1, the frameset has two rows. The top row holds the site identification. The bottom row splits into two columns with a nested frameset. One column holds the navigation, and the other holds the content. The content frame is the one with the scrollbar. The frameset document is invisible to the user. It sets up the arrangement of the visible pages shown in the frames. The user sees the results of the frameset document, but not the actual frameset document itself. But wait, there's an accessibility issue. Not all browsers work with framesets. Therefore, each frameset document contains a noframes section. Use the noframes section to provide basic information in case the user's browser cannot display frames. Links to your content pages are an example of good information to include in a noframes section. That way every user can find your valuable content. Dreamweaver lets you set up the frameset and then work on the individual Web pages for the frames separately. Or you can work on the individual Web pages while they are displayed in the frameset. Both are perfectly valid choices; for instance, an individual might manage a site with only a few pages inside the frameset, while a larger site might have numerous people handling different content pages.
|