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

frameSpacing property (frameset)

Browser support:
Sets or retrieves the space between frames in pixels.


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

Possible values:

String that sets or retrieves the space between frames with an integer, optionally followed by a 'px' (pixel) unit designator.
Default: 2.

Example HTML code 1:

This example illustrates the use of the frameSpacing attribute:
<frameset rows="*" cols="200, *" framespacing="30">
    <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 frameSpacing property of the frameset from one of its frames. The code below shows how to implement it.
<script type="text/javascript">
    function GetFramesetFrameSpacing () {
        var frameSet = window.frameElement.parentNode;
        return frameSet.frameSpacing;
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content