Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IHTMLFrameBase::marginHeight Property

Sets or retrieves the top and bottom margin heights before displaying the text in a frame.


HRESULT IHTMLFrameBase::get_marginHeight(VARIANT *p);HRESULT IHTMLFrameBase::put_marginHeight(VARIANT v);


Pointer to a variable of type VARIANT of type VT_BSTR or VT_I4 that receives the height, in pixels.
VARIANT of type VT_BSTR or VT_I4 that specifies the height, in pixels.

Return Value

Returns S_OK if successful, or an error value otherwise.


Margins cannot be less than 1 pixel or so large that the text cannot be displayed.

If IHTMLFrameBase::marginHeight is specified but IHTMLFrameBase::marginWidth is not, IHTMLFrameBase::marginWidth is set to 0.

If the document hosted in the frame or iframe has margin-top or margin-bottom properties set either through Cascading Style Sheets (CSS) or through the IHTMLBodyElement::topMargin or IHTMLBodyElement::bottomMargin properties of the body element, then this property is ignored.

See Also


Community Additions

© 2015 Microsoft