<FRAMESET>NN 2   IE 3   HTML 4
<FRAMESET>...</FRAMESET>End Tag: Required
 

Defines the layout of a multiple-frame presentation in a browser's application window. The primary duty of the FRAMESET element is to specify the geographical layout--in a row and column array--of rectangular frames. Attributes defined in a FRAMESET element apply to all FRAME elements nested within (unless overridden by a similar attribute for a specific FRAME). A FRAMESET element's tag takes the place in an HTML document that is normally devoted to the BODY element.

You may nest a FRAMESET element within a FRAMESET element. This tactic allows you to subdivide a frame from the outer FRAMESET element into two or more frames. For example, if you define one FRAMESET element with three rows and two columns, you get a total of six frames:

<FRAMESET ROWS="33%, 33%, 34%" COLS="50%, 50%">
    <FRAME NAME="r1c1"...>
    <FRAME NAME="r1c2"...>
    <FRAME NAME="r2c1"...>
    <FRAME NAME="r2c2"...>
    <FRAME NAME="r3c1"...>
    <FRAME NAME="r3c2"...>
</FRAMESET>

On the other hand, if you nest a frameset where a frame definition goes, that frame is divided into whatever frame organization is defined by that nested frameset. Consider the following nested frameset:

<FRAMESET ROWS="33%, 33%, 34%">
    <FRAME NAME="r1"...>
    <FRAMESET COLS="50%, 50%">
        <FRAME NAME="r2c1"...>
        <FRAME NAME="r2c2"...>
    </FRAMESET>
    <FRAME NAME="r3"...>
</FRAMESET>

You may nest FRAMESET elements as deeply as your page design requires. Be aware that frames can devour memory resources of browsers on some operating systems. Not all users appreciate frames that display borders, even when such a structure may make logical sense for your page design.

The outermost frameset document is the one whose TITLE attribute governs the display in the browser window title bar. Documents loaded into individual frames have no control over title bar display, although for reasons of scripting and potential application in future browsers, the TITLE attribute of framed documents should be set anyway.

If you wish to offer an option for a user to remove a frameset, you can supply a link or button that invokes a script. The script should set the top.location.href property to the URL of the single most important document of the pages loaded into frames (the primary content).

 
Example
<FRAMESET COLS="150,*">
    <FRAME NAME="navbar" SRC="nav.html">
    <FRAME NAME="main" SRC="page1.html">
</FRAMESET>
 
Object Model Reference
IE [windowRef.]document.all.framesetID
BORDERNN 3   IE 4   HTML n/a
BORDER="pixelCount"Optional
 

Frames display 3-D borders by default. The default thickness of that border varies with browser and operating system. You can adjust this thickness by assigning a different value to the BORDER attribute of the frameset. Only the outermost FRAMESET element of a system of nested framesets responds to the BORDER attribute setting.

Navigator 4 is consistent across Windows and Macintosh platforms by displaying a default border that is the same thickness as when the BORDER attribute is set to 5. For IE 4, the default value is 6 in Windows and 1 on the Mac (although the actual rendering is far more than one pixel wide). Any single setting you make for the BORDER attribute therefore does not look the same on all browsers. Moreover, at smaller settings, some browsers react strangely. IE 4 won't display a border in Windows when the value is 2 or less; Navigator loses its 3-D effect when the value is 2 or less. Navigator also has a nasty habit of rendering an odd divot in the center of frame bars on the Macintosh.

This hodge-podge deployment of frame borders may make you shy away from using them altogether (set the BORDER attribute to 0). In some cases, however, borders provide reassuring visual contexts for frame content that requires a scrollbar. Having a scrollbar appear floating in a browser window might be disconcerting to some viewers.

That the HTML 4.0 specification does not include a BORDER attribute might lead one to believe it prefers the use of style sheet borders instead of borders tied only to frames. Neither browser (through Version 4) responds to style sheet border settings, however.

 
Example
<FRAMESET COLS="150,*" BORDER=0>...</FRAMESET>
 
Value
An integer value. A setting of zero eliminates the border entirely. Although the value is supposed to represent the precise pixel thickness of borders in the frameset, this is not entirely true for all operating systems or browsers.
 
Default See description.
 
Object Model Reference
IE [windowRef.]document.all.framesetID.border
BORDERCOLORNN 3   IE 4   HTML n/a
BORDERCOLOR="colorTripletOrName"Optional
 

Establishes the rendering color for all visible borders in a frameset. A BORDERCOLOR setting in an outermost FRAMESET element may be overridden by a BORDERCOLOR attribute of a nested FRAMESET element (for the nested frameset's frames only) or an individual FRAME element. Browsers resolve conflicts of colors assigned to adjacent frames differently. Test your color combinations carefully if you mix border colors.

 
Example
<FRAMESET COLS="150,*" BORDERCOLOR="salmon">...</FRAMESET>
 
Value
A hexadecimal triplet or plain-language color name. See Appendix A for acceptable plain-language color names.
 
Default
Browser default, usually a shade of gray with black or blue highlighting for the 3-D effect.
 
Object Model Reference
IE [windowRef.]document.all.framesetID.borderColor
COLSNN 2   IE 3   HTML 4
COLS="columnLengthsList"Optional
 

Defines the sizes or proportions of the column arrangement of frames in a frameset. If it is the intent to use the FRAMESET element to create frames in multiple columns, you must assign a list of values to the COLS attribute.

Column size is defined in one of three ways:

An absolute pixel size

A percentage of the width available for the entire frameset

A wildcard (*) to represent all available remaining space after other pixels and percentages have been accounted for

Use an absolute pixel size when you want the width of a frame to be the same no matter how the user has sized the overall browser window. This is especially useful when the frame is to display an object of fixed width, such as an image. Use a percentage when you want the frame width to be a certain proportion of the frameset's width, no matter how the user has adjusted the size of the overall browser window. If you use all percentage values for the COLS attribute, they should add up to 100%. If the values don't add up to 100%, the browser makes the columns fit anyway. Finally, use the asterisk wildcard value to let the browser calculate the width of one frame when all other frames in the frameset have fixed or percentage values assigned to them. Separate the values within the attribute value string with commas.

You can mix and match all three types of values in the attribute string. For example, consider a three-column frameset. If you want the leftmost column to be exactly 150 pixels wide, but the middle column must be 500f the total frameset width, set the value as follows:

<FRAMESET COLS="150,50%,*">

The precise width of the two rightmost frames is different with each browser window's width adjustment. The rightmost frame width in this example is roughly equal to one half the width of the frameset minus the 150 pixels reserved for the leftmost frame.

To create a regular grid of frames, assign values to both the COLS and ROWS attributes in the FRAMESET element's tag. For an irregular array, you must nest FRAMESET elements, as shown in the description of the FRAMESET element, earlier in this section.

 
Example
<FRAMESET COLS="25%,50%,25%">...</FRAMESET>
 
Value
Comma-separated list of pixel, percentage, or wildcard (*) values. Internet Explorer 4 for the Macintosh exhibits incorrect behavior with some combinations that include a wildcard value.
 
Default 100%
 
Object Model Reference
IE [windowRef.]document.all.framesetID.cols
FRAMEBORDERNN 3   IE 3   HTML n/a
FRAMEBORDER="borderSwitch"Optional
 

Controls whether all frames within the frameset display a border (acting as dividers between frame edges). The FRAMEBORDER attribute of FRAME elements can override the FRAMESET element's setting for this attribute, but some frame organizations don't lend themselves well to eliminating frames from subgroups of frames. Override the FRAMESET element's attribute with caution and testing on all browsers and operating system platforms.

 
Example
<FRAMESET COLS="25%,50%,25%" FRAMEBORDER="no">...</FRAMESET>
 
Value
On-off values for this attribute vary with the browser. Navigator uses yes and no. Internet Explorer 4 accepts both yes | no and 1 | 0 (only the latter pair are specified for IE 3). For Version 4 cross-browser compatibility, use the yes/no pairing.
 
Default yes
 
Object Model Reference
IE [windowRef.]document.all.framesetID.frameBorder
FRAMESPACINGNN n/a   IE 3   HTML n/a
FRAMESPACING="pixelLength"Optional
 

The Internet Explorer FRAMESPACING attribute is an older version of the BORDER attribute. The older attribute is supported in IE 4 for backward compatibility. The behavior of FRAMESPACING attribute is more uniform across operating system versions of IE 4: a setting of 10 pixels generates a border between frames that is essentially identical in both Windows and Mac versions. For an IE-only deployment, the FRAMESPACING attribute is a more accurate way to create borders that look the same across operating system versions.

 
Example
<FRAMESET COLS="25%,50%,25%" FRAMESPACING="7">...</FRAMESET>
 
Value
A positive integer. Unlike the BORDER attribute, however, a setting of zero does not remove the border. Use the FRAMEBORDER attribute to hide borders entirely.
 
Default 2
 
Object Model Reference
IE [windowRef.]document.all.framesetID.frameSpacing
ROWSNN 2   IE 3   HTML 4
ROWS="rowLengthsList"Optional
 

Defines the sizes or proportions of the row arrangement of frames in a frameset. If it is the intent to use the FRAMESET element to create frames with multiple rows, you must assign a list of values to the ROWS attribute.

Row size is defined in one of three ways:

An absolute pixel size

A percentage of the height available for the entire frameset in the browser window

A wildcard (*) to represent all available remaining space in the browser window after other pixels and percentages have been accounted for

Use an absolute pixel size when you want the height of a frame row to be the same no matter how the user has sized the overall browser window. This is especially useful when the frame is to display an object of fixed height, such as an image. Use a percentage when you want the frame height to be a certain proportion of the frameset's height, no matter how the user has adjusted the size of the overall browser window. If you use all percentage values for the ROWS attribute, they should add up to 100%. If the values don't add up to 100%, the browser makes the rows fit anyway. Finally, use the asterisk wildcard value to let the browser calculate the height of one row when all other rows in the frameset have fixed or percentage values assigned to them. Separate the values within the attribute value string with commas.

You can mix and match all three types of values in the attribute string. For example, consider a three-row frameset. If you want the bottom row to be exactly 80 pixels high to accommodate a navigation bar, but the middle row must be 500f the total frameset height, set the value as follows:

<FRAMESET ROWS="*,50%,80">

The precise height of the two topmost frames is different with each browser window's height adjustment. The topmost frame height in this example is roughly equal to one half the height of the frameset minus the 80 pixels reserved for the bottom row.

To create a regular grid of frames, assign values to both the COLS and ROWS attributes in the FRAMESET element's tag. For an irregular array, you must nest FRAMESET elements, as shown in the description of the FRAMESET element, earlier in this section.

 
Example
<FRAMESET ROWS="25%,50%,25%">...</FRAMESET>
 
Value
Comma-separated list of pixel, percentage, or wildcard (*) values. Internet Explorer 4 for the Macintosh exhibits incorrect behavior with some combinations that include a wildcard value.
 
Default 100%
 
Object Model Reference
IE [windowRef.]document.all.framesetID.rows
STYLENN n/a   IE 4   HTML 4
STYLE="styleSheetProperties"Optional
 

This attribute lets you set one or more style sheet rule property assignments for the current element. The format of the property assignments depends on the browser's default style, but both Navigator and Internet Explorer accept the CSS syntax. Documents loaded into frames in IE 4 override style settings for a frameset, so don't bother writing STYLE attributes for FRAMESET elements.

 
Value
An entire CSS-syntax style sheet rule is enclosed in quotes. Multiple style attribute settings are separated by semicolons. Style sheet attributes are detailed in .
 
Default None.
 
Object Model Reference
IE [windowRef.]document.all.framesetID.style
Hosted by uCoz