Visit Mozilla.org

CSS:margin-top

From MDC

« CSS Reference

[edit] Summary

margin-top property of an element set the margin space required on the top of an element. A negative value is also allowed.

[edit] Syntax

margin-top: <length> | <percentage> | inherit | auto;

[edit] Values

<length>
Specifies a fixed height.
<percentage>
a percentage with respect to the height of the containing block.

[edit] Examples

View Live Examples

.content { margin-bottom: 5%; }

.sidebox { margin-bottom: 10px; }

[edit] Notes

[edit] Specifications

[edit] Browser compatibility

(FIXME)

Browser Lowest Version
Internet Explorer ?
Firefox ?
Netscape ?
Opera ?
Safari ?

[edit] See also

margin, margin-bottom, margin-left, margin-right, margin-top , -moz-margin-start, -moz-margin-end, border, padding