margin-top

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

margin-top: <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

DOM

Δ

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

Example | auto

Δ

Example | length

Δ

Example | percentage

Δ

Example | DOM

Δ

References

Δ