property
margin-left — CSS reference
Sets the physical left margin edge. Initial zero; not inherited. A percentage uses the containing block inline size, even for top or bottom. Negative lengths are valid; auto is layout-dependent. This is not a direction-relative property.
Formal Syntax & Structure
css syntaxcss
<length-percentage> | autoWorking Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS box geometry lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}#parent{width:200px;display:flow-root} #a{margin:0;margin-left:10%;width:80px;height:20px}</style><body><div id="parent"><div id="a" class="sample">Box</div></div></body></html>