The margin-leftCSS property of an element sets the margin space required on the left side of a box associated with an element. A negative value is also allowed.
The vertical margins of two adjacent boxes may fuse. This is called margin collapsing.
In the rare cases where width is overconstrained (that is when all of width, margin-left, border, padding, the content area and margin-right are defined), margin-left is ignored, and will have the same calculated value as if the auto value was specified.
margin-left: 10px; /* An absolute length */
margin-left: 1em; /* A length relative to the text size */
margin-left: 5%; /* A margin relative to the nearest block container's width */
Is a <length> specifying a fixed width: it can be absolute width, e.g. in px, or a width relative to the text size, e.g. in em, or relative to the viewport size, e.g. in vh.
Is a <percentage> relative to the width of the nearest containing block.
Is a keyword indicating that the left margin receives a share of the remaining space, defined mainly by the current layout mode.. If there several auto values for margin-left or margin-right, the calculated space is evenly distributed between all the auto values. This table summarizes the different cases: