margin-bottom

  • Revision slug: CSS/margin-bottom
  • Revision title: margin-bottom
  • Revision id: 25837
  • Created:
  • Creator: BijuGC
  • Is current revision? No
  • Comment

Revision Content

{{template.CSSRef()}}

Summary

margin-bottom property of an element set the margin space required on the bottom of an element. A negative value is also allowed.

  • {{template.Xref_cssinitial()}}: 0
  • Applies to: all elements
  • {{template.Xref_cssinherited()}}: no
  • Percentages: refer to {{template.Cssxref("height")}} of closest block-level ancestor
  • Media: {{template.Xref_cssvisual()}}
  • {{template.Xref_csscomputed()}}: the percentage as specified or the absolute length

Syntax

margin-bottom: {{template.Xref_csslength()}} | {{template.Xref_csspercentage()}} | {{template.Cssxref("inherit")}} | {{template.Cssxref("auto")}};

Values

<length>
Specifies a fixed width.
<percentage>
a percentage with respect to the width of the containing block.

Examples

{{template.CSSRefExampleLink("margin-bottom")}}

  .content {margin-bottom: 5%}

  .sidebox {margin-bottom: 10px}

Notes

Specifications

Browser compatibility

(FIXME)

Browser Lowest Version
Internet Explorer ?
Firefox ?
Netscape ?
Opera ?
Safari ?

See also

{{wiki.template('CSS_Reference:Margin')}}

Revision Source

<p> 
{{template.CSSRef()}}
</p>
<h3 name="Summary"> Summary </h3>
<p><b>margin-bottom</b> property of an element set the margin space required on the bottom of an element. A negative value is also allowed.
</p>
<ul><li> {{template.Xref_cssinitial()}}: 0
</li><li> Applies to: all elements
</li><li> {{template.Xref_cssinherited()}}: no 
</li><li> Percentages: refer to {{template.Cssxref("height")}} of closest block-level ancestor
</li><li> Media: {{template.Xref_cssvisual()}}
</li><li> {{template.Xref_csscomputed()}}: the percentage as specified or the absolute length 
</li></ul>
<h3 name="Syntax"> Syntax </h3>
<pre class="eval">margin-bottom: {{template.Xref_csslength()}} | {{template.Xref_csspercentage()}} | {{template.Cssxref("inherit")}} | {{template.Cssxref("auto")}};
</pre>
<h3 name="Values"> Values </h3>
<dl><dt>&lt;length&gt;</dt><dd> Specifies a fixed width. 
</dd><dt>&lt;percentage&gt;</dt><dd> a percentage with respect to the width of the containing block. 
</dd></dl>
<h3 name="Examples"> Examples </h3>
<p>{{template.CSSRefExampleLink("margin-bottom")}}
</p>
<pre>  .content {margin-bottom: 5%}

  .sidebox {margin-bottom: 10px}
</pre>
<h3 name="Notes"> Notes </h3>
<h3 name="Specifications"> Specifications </h3>
<ul><li> <a class="external" href="http://www.w3.org/TR/CSS1#margin-bottom">CSS 1</a>
</li><li> <a class="external" href="http://www.w3.org/TR/CSS21/box.html#margin-properties">CSS 2.1 box</a>
</li><li> <a class="external" href="http://www.w3.org/TR/css3-box/#the-margin">CSS 3 box</a>
</li></ul>
<h3 name="Browser_compatibility"> Browser compatibility </h3>
<p>(FIXME)
</p>
<table class="standard-table">
  <tbody><tr>
    <th>Browser</th>
    <th>Lowest Version</th>
  </tr>
  <tr>
    <td>Internet Explorer</td>
    <td>?</td>
  </tr>
  <tr>
    <td>Firefox</td>
    <td>?</td>
  </tr>
  <tr>
    <td>Netscape</td>
    <td>?</td>
  </tr>
  <tr>
    <td>Opera</td>
    <td>?</td>
  </tr>
  <tr>
    <td>Safari</td>
    <td>?</td>
  </tr>
</tbody></table>
<h3 name="See_also"> See also </h3>
<p>{{wiki.template('CSS_Reference:Margin')}}
</p>
Revert to this revision