Tutorial 5: Using Frames in a Web Site. Tutorial Objectives. Create frames for a Web site Control the appearance and placement of frames Control the behavior of hyperlinks on a Web page with frames Use reserved target names to specify a target for a hypertext link
It is recommended to draw an example of what you would like your Web page to look like before you get started.
This figure shows frame layouts in either rows or columns.
This figure shows frames of different sizes.
160 pixels wide
25% of the width of the display area
whatever space is left
tag creates two rows of frames: the first 85 pixels high and the second occupying the remaining display areaCreating Two Rows of Frames
logo frame the second occupying the remaining display area
rest of the framesLogo and Placement
source for the first frame
heading extends beyond the frame border, causing a vertical scroll bar to be displayed
table of contents frame
home page frameWeb Site with Frames
The design of the frame layout could use some refinement.
The appearance of scroll bars may or may not be appropriate for the web pages.
If the complete text cannot be displayed after removing the scroll bars from a frame, you will need to modify the frame margin.
height of the margin for the home page will be 0 pixels and the width of the margin will be 10 pixelsSpecifying the Margin Sizes for the Frames
The margin height is set to 0 pixels.
The frame margin width is set to 10 pixels, to keep the page from running into the borders of its frame.
lessons.htmFiles and Hyperlinksin a Web Site
Name: links pixels
the frame name pixelsAssigning a Name to Each Frame
Once the frames are named, the next task is to specify the target frame for each hyperlink.
lessons.htmSpecifying a Link Target
How the frame is aligned with the surrounding text (use "left" or "right" to flow text around the inline frame.)
The size of the border around the frame, in pixels
Specifies whether to display a border ("yes") or not ("no")
The class identifier of the object
The height and width of the frame, in pixels
The horizontal and vertical space around the frame, in pixels
The size of the internal margins of the frame, in pixels.
The name of the frame
Specifies whether the frame can be scrolled ("yes") or not ("no")
The location and filename of the page displayed in the frameAttributes Associated with the <iframe> Tag
floating frame pixelsViewing a Floating Frame
If you want to use floating frames in your Web page, you must make sure that your users are running at least Internet Explorer 3.0 or Netscape 6.2. Users of other browsers and browser versions might not be able to view floating frames.
First row pixels
second row with 4 cols
Floating frame named “images”
One frame named “links”
The second column: named “home”
the first column ina frame named “links”