You are here: Reference > JavaScript > client-side > HTML DOM > properties > rows (frameset)

rows property (frameset)

Browser support:
Sets or retrieves the heights of the rows within a frameset element. All frame elements in the same row have the same height as the row.
The rows property not only specifies the height of rows, but also specifies the count of rows in the frameset. The count of the comma-separated items in the value of the rows property defines the count of the rows.
The cols property is similar to the rows property, but it defines the width and the count of the columns in the frameset.
The order of the frames is left-to-right, and top-to-bottom.


You can find the related objects in the Supported by objects section below.
This property is read/write.
HTML page for this property: rows

Possible values:

String that sets or retrieves a comma-separated list, that specifies or retrieves the height of the rows in the current frameset.
The height can be one of the following values:
height in pixels
Integer with or without a px (pixel) designator.
Integer higher or equal to 0 , with a % designator. The value is a percentage of the height of the frameset.
Integer, followed by a '*' sign. Defines the height as a relative value. If only the '*' sign is defined, it is equivalent to the value of '1*'. After the pixel and percentage values are calculated, the rest of the space is divided among the relative values. For example, if there are two relative values: (2*, 3*) and the remaining space is 250px, than the value of '2*' represents a 100px height row, the value of '3*' represents a 150px height row.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the rows attribute:
<frameset rows="110,*" cols="*" border="10px" bordercolor="red">
    <frame src="topFrame.htm" name="topFrame" scrolling="No"/>
    <frame src="mainFrame.htm" name="mainFrame"/>
Did you find this example helpful? yes no

Example HTML code 2:

You can get the rows property of the frameset from one of its frames. The code below shows how to implement it.
<script type="text/javascript">
    function GetFramesetRows () {
        var frameSet = window.frameElement.parentNode;
        return frameSet.rows;
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content