MSDN Library

IHTMLBodyElement::topMargin Property

Sets or gets the margin for the top of the document.

Syntax


HRESULT IHTMLBodyElement::get_topMargin(VARIANT *p);HRESULT IHTMLBodyElement::put_topMargin(VARIANT v);

Parameters

p
Pointer to a variable of type VARIANT of type VT_BSTR or VT_I4 that receives the top margin of the body, in pixels.
v
VARIANT of type VT_BSTR or VT_I4 that specifies the top margin of the body, in pixels.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

If the value is set to "0" or "", the top margin is on the top edge of the window or frame.

By default, when you set the value of this property, the opposite margin is set to the same value.

Community Additions

Show:
© 2016 Microsoft