Easy Tutorial
❮ Sel Focus Pr Grid Column End ❯

CSS margin-bottom Property

Example

Set the bottom margin of a p element:

p 
    {
    margin-bottom:2cm;
    }

Property Definition and Usage

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

Note: Negative values are allowed.

Default value: 0
Inherited: no
--- ---
Version: CSS1
--- ---
JavaScript syntax: object.style.marginBottom="10px"
--- ---

Browser Support

The numbers in the table specify the first browser version that fully supports the property.

Property
margin-bottom 1.0 6.0 1.0 1.0 3.5

Property Values

Value Description
auto The browser calculates the bottom margin.
length Specifies the bottom margin in a specific unit, such as pixels, centimeters, etc. The default value is 0px.
% Specifies the bottom margin as a percentage of the width of the parent element.
inherit Specifies that the bottom margin should be inherited from the parent element.

Related Articles

CSS Tutorial: CSS Margin

❮ Sel Focus Pr Grid Column End ❯