y TMLP Online HTML Primer

TMLP Online HTML Primer

Frames Elements and Parameters

<FRAMESET ROWS=(# or % or *, # or % or *, etc) [or] COLS=(# or % or *, # or % or *, etc) BORDER=# FRAMEBORDER=#>

How many frames a frameset contains are determined by either the ROWS or COLS parameter. A single frameset cannot divide a page by both rows and columns (though frames can be nested)

The values associated with ROWS control the height of each frame, and the values associated with COLS control the width of each frame. These values can be expressed in three fashions:

A specific number (the number of pixels), a percentage (a percentage of the current page width), or an asterisk (*), which indicates “whatever is not taken up by the other frames.”

EXAMPLE: < FRAMESET ROWS=75,50%,* >

BORDER and FRAMEBORDER actually both do exactly the same thing: they control how much of a border (in pixels) is displayed between the frames. Setting this to 0 indicates there is no break between frames; they blend directly into each other.

The only difference is that BORDER implements the effect when viewed by Netscape browsers and FRAMEBORDER implements the effect when viewed by Microsoft browsers. To make the effect work for both browser types, set both parameters to the same value.

<FRAME SRC=(URL for frame 1) NORESIZE SCROLLING=YES, NO,AUTO MARGINWIDTH=# MARGINHEIGHT=# NAME=(Name)>

SRC = Source. What URL is displayed in this frame (usually a Web page; can be a standard HTML document or another layout document if you want to nest frames)

NORESIZE = Prevents viewers from resizing the frame; keeps it at its pre-set size (as determined by the <FRAMESET> parameters.)

SCROLLING = Determines whether there is a scrollbar for this frame or not. A “YES” value forces a scroll bar, whether the frame needs one or not. A “NO” value does not allow a scroll bar, even if the frame goes off the screen (users will not be able to view all of the frame in this case). An “AUTO” value displays a scroll bar if it is required, and does not display one if it is not required.

MARGINWIDTH = The number of pixels that separate the left and right edges of the frame from the contents of the frame.

MARGINHEIGHT = The number of pixels that separate the top and bottom edges of the frame from the contents of the frame.

NAME = A specific name for this frame. This cannot be any of the following: “_top,” “_parent,” “_blank,” “_self” (these are reserved names for frames)

EXAMPLE:

<FRAME SRC=“http://www.tmlp.com” NORESIZE SCROLLING=AUTO MARGINHEIGHT=3 MARGINWIDTH=2 NAME=“TMLP”>

 


Previous: Frames Structure
Next: Frame Interaction
Return To TMLP Online Residential Services