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:
Method | Example |
---|---|
auto | Takes default margin size from browser |
length | Defines a fixed bottom margin with the specified value |
percentage | Defines 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
The World Wide Web Consortium (W3C) provides a free online CSS validation service.