Fandom

Margin-left

648pages on
this wiki
Add New Page
Comments0 Share

The margin-left property is used in CSS and certain HTML elements. It sets the margin space required on the left side of an element. A negative value is also allowed. The margin property is the shorthand property for setting the margin for all sides, or individual sides, of an element. Other properties for setting the other margins are margin-bottom, margin-top, and margin-right.


ValuesEdit

Value Description
<length> Specifies a fixed width. Examples of lengths are: pt, px, em, etc.
<percentage> A <percentage> is always relative to the width of the containing block.
auto See the auto value for margin.


HTML example:

<h1 style="margin-left:5px;">
1st heading content.
</h1>


CSS example:

h1 {
    margin-left:5px;
}

See AlsoEdit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.