BODY.topMargin (Property)

A margin value at the top of the document window.

Availability:

JScript - 3.0
Internet Explorer - 4.0
Property/method value type:Number primitive
JavaScript syntax:IEmyBODY.topMargin

Normally, you would not need to specify this property. It allows the document to have some clear space at the top so, for example, the content could be made to scroll completely off the screen when it is loaded.

The distance is measured in pixels and can range from zero (which is the default) to any reasonably sensible value. Making it any bigger than the screen size is pointless.

This corresponds to the style.marginTop property and the margin-top attribute that is defined in a style sheet.

Warnings:

See also:BODY.bottomMargin