Name
marginHeight, marginWidth — NN n/a IE 4 DOM n/a
Synopsis
Read/Write
The number of pixels between the inner edge of a frame and the
content rendered inside the frame. The
marginHeight property controls space along the top
and (when scrolled) bottom edges of a frame; the
marginWidth attribute controls space on the left
and right edges of a frame.
Without any prompting, Internet Explorer 4 automatically inserts a margin of 14 (Windows) or 8 (Macintosh) pixels inside a frame. But if you attempt to override the default behavior, be aware that setting any one of these two attributes causes the value of the other to go to zero. Therefore, unless you want the content to be absolutely flush with various frame edges, you need to assign values to both attributes.
Example
parent.document.all.myFrame.marginHeight = 14 parent.document.all.myFrame.marginWidth = 5
Value
Positive integer value or zero.
Default
14 (Windows) or 8 (Macintosh).
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access