CSS margin-bottom Property


The CSS margin-bottom property specifies how much margin should be used at the bottom of an element. The margin can be specified as a length or as a percentage.

Syntax

Example

Preview

Property Values

Value Description
length Specifies a fixed bottom margin in px, cm, em, and other units. The default value is zero. Negative values are permitted. Learn more about length units.
% Sets the bottom margin as a percentage of the width of the containing element.
auto The bottom margin is calculated by the browser.
initial This property is set to its default value.
inherit This property is inherited from its parent element.

Supported Browsers

Property Chrome Firefox Safari Edge / IE Opera
margin-bottom 1.0 1.0 1.0 6.0 3.5