Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Frame/IFrame marginWidth property

Frame/IFrame marginWidth property

Frame/IFrame Object Reference Frame/IFrame Object


Definition and Usage

The marginWidth property can set or return the value of the marginWidth attribute of the frame/iframe element.

The marginwidth attribute specifies the left and right page margins of the frame (in pixels).

Syntax

frameObject.marginWidth=

pixels

or

iframeObject.marginWidth=

pixels


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the marginWidth property


Example

Example

Return the value of the marginwidth property:

document.write(document.getElementById("myframe").marginWidth);

Try it »


Frame/IFrame Object Reference Frame/IFrame Object