Margins in DHTML


Setting Element Margins

Define margins as follows.

BODY {margin: 5em; }
H2 { margin: -5em; }

Individual Margins

Margins can be set individually for the top, bottom, left and right of the document.

BODY { margin: 2em; }
.left { margin-left: 5em; }
.right { margin-left: 4em; }
.top { margin-top: -1em; }
.bottom { margin-bottom: -1em; }