margin-right
Sets the amount of empty space on the right side of an element. This creates a gap between the element and whatever is to its right.
It is documented as part of the CSS Anchor Positioning, CSS Box Model specification.
Syntax
/* Usage Example */
.icon-with-margin {
/* Adds space to the right of the icon */
margin-right: 8px;
}
/* Syntax */
margin-right: auto;
margin-right: anchor-size;
/* Global values */
margin-right: inherit;
margin-right: initial;
margin-right: revert;
margin-right: revert-layer;
margin-right: unset;
margin-right Browser support
Widely available
Since
2015 96% global usage
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.
1+
1+
1+
12+