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.
Note that the default values are platform-dependent and although it is only a couple of pixels difference it can throw off the layout of a page significantly if you make the wrong assumption.
See also: | BODY.bottomMargin |
Prev | Home | Next |
BODY.text | Up | BODY.vLink |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |