Frame/IFrame marginWidthProperty
Frame/IFrame Object
Definition and Usage
The marginWidth property sets or returns the value of the marginWidth attribute in a frame/iframe element.
The marginwidth attribute specifies the left and right margins of the frame (in pixels).
Syntax
frameObject.marginWidth=pixels
or
iframeObject.marginWidth=pixels
or
iframeObject.marginWidth=pixels
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the marginWidth property.
Example
Example
Return the value of the marginwidth attribute:
document.write(document.getElementById("myframe").marginWidth);
Try it Yourself »
Frame/IFrame Object Other Extensions