Frame/IFrame marginHeightProperty
Frame/IFrame Object
Definition and Usage
The marginHeight property sets or returns the value of the marginHeight attribute in a frame/iframe element.
The marginheight attribute sets the top and bottom margins of a frame (in pixels).
Syntax
frameObject.marginHeight=pixels
or
iframeObject.marginHeight=pixels
or
iframeObject.marginHeight=pixels
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the marginHeight property.
Examples
Examples
Return the value of the marginheight attribute:
document.write(document.getElementById("myframe").marginHeight);
Try it yourself »
Frame/IFrame Object Other Extensions