IHTMLFrameBase::marginHeight Property

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

Syntax


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

Parameters

p
Pointer to a variable of type VARIANT of type VT_BSTR or VT_I4 that receives the height, in pixels.
v
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.

Remarks

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

IHTMLFrameBase::marginWidth

Community Additions

Show: