Using the
Frames
Panel
You've probably noticed by now that Dreamweaver has a panel for everything. Frames are no exception. If the Frames panel isn't visible, choose Window > Frames to bring it into view.
It's a good idea to keep the Frames panel in view when working with a framed site. It gives you a
miniature
view of the frames within a frameset. It also gives you an easy way to select either an individual frame or an entire frameset.
To select frames and framesets with the Frames panel:
|
1.
|
In the Frames panel, click the outermost border around the frameset (
Figure 11.7
).
The selected frameset will display a thick black border.
|
|
2.
|
Do one of the following:
-
To select a nested frameset, click the white border around the frameset (
Figure 11.8
).
The selected frameset will display a thick black border.
or
-
To select an individual frame, simply click inside the frame (
Figure 11.9
).
The selected frame will display a thick black border.
|
Tips
-
When you select a frame in the Frames panel, the corresponding frame is selected in the document window. A
dotted
border highlights the selected frame in the document window. (
Figure 11.10
) The tag selector displays the appropriate elementin this example it's
<frame#topFrame>
.
-
When you select a frameset in the Frames panel, the corresponding frameset is selected in the document window. A dotted border highlights the frameset (
Figure 11.11
). The Tag Selector displays the appropriate elementin this example, it's
<frameset><frameset>
.
To adjust rows or
columns
of the frameset:
|
1.
|
Select the frameset in the Frames panel.
|
|
2.
|
Make adjustments with the Property Inspector (
Figure 11.12
).
The Property Inspector displays options for Border, Border width, and Border
color
. You can also set either the row height or column width, depending on which is selected. Enter in a value, and choose pixels, percentage, or relative units.
If the selected frameset contains rows, the rows are miniaturized on the Property Inspector. The selected row is indicated in a dark gray. Clicking a row in this miniature display on the Property Inspector selects it. Set the Row Value (that is, the height) for each row as needed.
If the selected frameset contains columns, the columns are miniaturized on the Property Inspector (
Figure 11.13
). The selected column is indicated in a dark gray. Clicking a miniature column in this display on the Property Inspector selects it. Set the Column Value (that is, the width) for each column as needed.
|
Tips
-
Row height and column width can be set in exact units (pixels), as a percentage of the frameset, or as relative. If you choose relative, the row or column will take up whatever space is available. Relative rows and columns can shrink or grow, depending on the
size
of the browser window. Relative units are
considered
the most accessible.
-
As you work with frames, you'll see that Dreamweaver provides many visual cues, such as dotted borders around selected framesets in the document window and thick borders around selected framesets in the Frames panel. These visual cues are important to watch because it is easy to
accidentally
change something you don't intend to change in a complicated frameset if you don't pay attention to the selected element. They also help you make sure you have the right element selected when it comes time to save your work. Remember that these visual cues won't show up in the Web browser.
-
Selecting a frame or frameset in the Frames panel is not the same as placing an insertion point in a frame by clicking within a frame in the document window.
To adjust frame properties:
|
1.
|
Select the frame you want in the Frames panel.
|
|
2.
|
The Property Inspector displays properties for that frame (
Figure 11.14
). Make changes in one or more of the properties:
-
Frame
name
gives a needed identifier to the frame (see the sidebar "Frame Name vs. Frame Title"). Each frame must have a name. If you create a custom frameset, you need to supply the name for the frameset yourself. (Dreamweaver
supplies
a default
name
for each frame in the preset framesets.) A name that helps you make sense of your layout such as
leftFrame
,
navFrame
, or
menuFrame
is what you want here. No spaces are allowed in the
name
.
-
Src
is the URL of the page that will initially be displayed in the frameset. Setting this field is covered below in "Inserting Pages Into Frames."
-
Scroll
options are No, Auto, and Default.
No
means that frame will not have a scrollbar ever, even if not all the contents of the frame are visible.
Auto
means a scrollbar will appear automatically if the contents of the frame are larger than the frame can display.
Default
is the browser's default, which is usually Auto. Scrollbars can be horizontal or vertical, depending on which is needed to see all the contents of a frame.
-
Normally a frame can be resized in the browser. Checking the
No resize
check box means that there will be no way to resize a frame in the browser. If you leave it unchecked, users can drag the frame borders in the browser window. This is useful for users who prefer to have especially small or
especially
large browser
windows
.
-
Margin width
and
Margin height
refer to the margin
surrounding
an individual frame.
-
Borders
, which can be set at the frameset level, can also be set individually for each frame.
-
Border color
allows you to set the color for the frame borders. Click the color well to bring up a color picker to help you set the color.
|
Tips
-
If you click inside a frame in the document window, the Property Inspector displays the standard text properties for that frame's document. To change the properties of the frame itself, use the Frames panel to select the frame.
-
Monitor size and screen resolution can vary widely among users. Some users must enlarge the text with the browser controls in order to read it. It is a good idea to test your framed site with various browser configurations. Only testing will show you whether scrollbars or resizing are needed so that all your content is viewable.
-
Size issues can also lead to printing problems in some situations. You may need to provide special printer-friendly pages for a framed site.
-
One of the reasons that frames got such a bad reputation was due to the tacky look of sites after frame border colors were applied. If you're considering changing your framed site's border colors,
please
reconsider unless you've got a darned good reason.
|