Menu
The margin-right
property designates the right margin of an element.
Both positive and negative values are allowed.
div.ex {
margin-right: 20px;
}
length
Designates in length units (px, pt, em, etc.) a fixed right margin of the element. Default value is 0.
%
Designates a right margin in percentage of the width of the containing element.
auto
The right margin is calculated by the browser.
initial
Sets the property to its default value.
inherit
Inherits this property’s value from its parent item.
Have a code example of margin-right
? Submit a codepen.io demo and we'll showcase it here ↴