Open main menu

CDOT Wiki β

CSS GUIDE MARGIN BOTTOM

This document is a work in progress and is subject to change.

Summary

The margin-bottom property is used to set the bottom margin of an element.

Applicability:The margin-bottom property can be used for all CSS elements.
Media Group: Visual
Inherited:No

Syntax

TARGET_ELEMENT { margin-top: value }

Legal Values

Values can be entered in 3 ways:

MethodExample
autoTakes default margin size from browser
lengthDefines a fixed bottom margin with the specified value
percentageDefines a variable bottom margin with the specified value

See usage examples section for more details.

Mozilla Recommended Values

Usage Examples

TARGET_ELEMENT { margin-bottom: 10px }
TARGET_ELEMENT { margin-bottom: -20px }
TARGET_ELEMENT { margin-bottom: 1em }

Notes

Specification Conformance

Browser Compatibility

See Also