ONLINEPROOFINGSERVICE.COM

marketing communications - www.onlineproofingservice.com

Menu


somewhat easier. When you create a Web page with frames in Dreamweaver, you need to remember that each frame area is a separate


HTML file, and Dreamweaver saves each frame area as a separate page. You also want to keep track of which file displays in which of the frames so that you can aim links properly. Figure 7-2 shows a simple frameset example with three frames, each containing a different HTML page and different text (Page 1, Page 2, and Page 3) so that I can clearly refer to them in the following numbered steps. In addition to the files that display in each frame, you need to create a separate HTML file to generate the frameset. This page doesnt have a <BODY> tag, but it describes the frames and instructs the browser how and where to display them. This gets a little complicated, but dont worry: Dreamweaver creates the frameset HTML file for you. I just want to give you a general understanding of all the files that youre creating so that the following steps make more sense. To help you understand how this works, take a look at the example in Figure 7-2. In this document, you see three frames, each displaying a different HTML page. The fourth HTML file that makes up the frame page contains the other frames but doesnt show up in the browser. This file is the frameset file, and it describes how the frames display, whether they are on the left or the right side of the page, the top or bottom, and how large they are. The frameset file also contains other information, such as the name of each frame, which is used to specify which frame a link opens into or targets. You find out more about linking frames in the "Setting Targets and Links in Frames" section later in this chapter. Creating a frame in Dreamweaver When you create a frame page in Dreamweaver, realizing that the file you are starting with is the frameset file is important - the file doesnt show up in the browser but merely instructs the browser how to display the rest of the frames and which pages to use as content for each frame. When you edit the content of any of the frames in the frameset, you do not actually edit the frameset file, but the files that populate the framed regions within the frameset. Normally you have to edit the files separately, but Dreamweaver makes designing with frames easier by letting you edit the content of each frame in the context of the frameset as it looks in a browser. If you can grasp this concept, youve come a long way toward understanding how frames work and how to use Dreamweaver to create and edit them. If it hasnt sunk in yet, read on and it will. 182 Part III: Advancing Your Site Creating a frame by using the Split Frame command You can create frames in two ways in Dreamweaver. The first way is achieved by splitting a single HTML file into two sections, which then become individual frames. When you do that, Dreamweaver automatically generates an untitled page with the <FRAMESET> tag and then additional untitled pages display in each of the frames within the frameset. Suddenly, youre managing several pages, not just one. This concept is important to understand because you have to save and name each of these pages as a separate file, even though Dreamweaver makes you think youre working on only one page thats broken into sections. Always save your HTML files first before inserting anything into them; however, the opposite is true when you work with frame files in Dreamweaver. Wait until after you create all the frames in your frameset and then save them one at a time; otherwise, tracking your files gets a bit too complicated and confusing. I explain more in the section, "Saving files in a frameset," later in this chapter; but first, you create a simple framed page. To create a simple frameset in Dreamweaver, such as the one shown in