- Dreamweaver Site Setup
- Dreamweaver Text and Links
- Dreamweaver Adding Images
- Dreamweaver Using Styles
- Dreamweaver Using Layers (divs)
- Dreamweaver Using Templates
- Dreamweaver XHTML Code
- Dreamweaver Frames
Frames allow you to 'split' the browser window. Each section, called frame, can display a different web page (document). This can be useful when you want to change only part of the page. Think of a website where the title banner and menu can stay the same and only the area where the content is shown, changes when you click a link in the menu.
A frameset for a website is stored in a separate page. This page won't have any other content, only information on how the window should be split into frames and which page should be displayed by default in each frame. Normally, the frameset for an entire site would be stored in the file index.html; index.html is the page that's opened by default for your website. This ensures that visitors will start your website in the proper frame layout (frameset).
Creating Framesets in Dreamweaver
Choose File > New. Select Framesets in the left column. You can choose one of the presets in the right column. Then click Create.
A frameset of two frames will create 3 pages:
- the page specifying the frameset
- the default page to be shown in the first frame
- the default page to be shown in the second frame
Dreamweaver opens all three (in this case) files in one single tab by default. Depending on the position of the cursor, Dreamweaver activates the corresponding file. Use the Frames Panel (Windows > Frames) to keep track of the different frames and files.
Clicking the outer most border (shown in black in the image) activates the page holding the frameset. You can use the Properties Panel to change various settings for the frameset, such as whether you wan't to have a border around each frame, but also the size of the frames.
A frameset always creates two ore more divisions of the entire window (rows or columns). A frameset that divides the window into two rows will usually specify a height for one of the frames, making the other frame to take up the space that is left.
Saving a Frameset for the first time
It's easiest to use File > Save All. Dreamweaver will save all pages for the frameset. At the first save, you'll need to specify a name for each page.
The page that holds frameset (Dreamweaver shows a dashed border around the entire page) is usually saved as index.html (default page). The page(s) with the default content for each frame (showing a dashed border around the relative frame) is usually saved using the name of the frame.
When you're planning to create several pages to be displayed in a specific frame, it may be useful to create a directory with the name of the frame. You can store all pages for that frame in that directory, making it easier to keep track of all your pages. The page that is shown by default (specified in the frameset) could be named default.html.
Frames and Links
Each frame has a name. This name can be used as a Target for a link. When a link in a page shown in frame A should open a page that should be shown in Frame B, Frame B should be specified as Target.
When you're editing a page directly (not shown by dreamweaver in a frameset), Dreamweaver won't automatically show the frame names in the Target pull-down. Therefore it's recommended to write down the names of the frames in your website.
If you don't specify a target, the link will open in the same frame as where the page the link was in.
Editing Frameset pages
It can get pretty confusing to edit the page for every frame through the entire frameset. It's recommended to close the frameset, once your satisfied with the layout of your frameset and edit each page separately. To evaluate the complete site, it's best to preview the page with the frameset in a web browser.