margin-bottom

The margin-bottom property sets the bottom margin of an element.

Syntax

margin-bottom: <length> | <percentage> | auto | inherit
Initial: 0
Applies To: all elements except elements with table display types other than table-caption, table and inline-table
Inherited: no
Percentages: refer to width of containing block
Media: visual

Values

margin-bottom: value
Value Initial Description
auto Specifies an automatically generated value
length 0 Specifies a fixed length
percentage Specifies a percentage of the containing block

DOM

[window.]document.getElementById("element-id").style.marginBottom = "margin-bottom";

Example | auto

Example | length

Example | percentage

Example | DOM

External

W3C Cascading Style Sheets, level 1

W3C Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification

W3C CSS basic box model