css.properties

margin-left

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

Formal Syntax

margin-left = <length-percentage> | auto | <anchor-size()> <length-percentage> = [ <length> | <percentage> ]

See specification

JavaScript Access

// Access via element.style element.style.marginLeft = 0;

Logical Property Group

This property belongs to the margin logical property group, which includes:

Browser Support

standard | MDN ยท Spec

FeatureChromeFirefoxSafariEdge
margin-left11112
anchor-size13214726132
auto11112

Related Properties