mozilla

Revision 494347 of padding-bottom

  • Revision slug: Web/CSS/padding-bottom
  • Revision title: padding-bottom
  • Revision id: 494347
  • Created:
  • Creator: kscarfone
  • Is current revision? No
  • Comment Updated tags

Revision Content

{{ CSSRef() }}

Summary

The effect of the CSS padding-bottom property on the element boxThe padding-bottom CSS property of an element sets the height of the padding area at the bottom of an element. The padding area is the space between the content of the element and it's border. Contrary to {{ cssxref("margin-bottom")}} values, negative values of padding-bottom are invalid.

{{cssbox("padding-bottom")}}

Syntax

Formal syntax: {{csssyntax("padding-bottom")}}
padding-bottom: 0.5em;
padding-bottom: 0;
padding-bottom: 2cm;
padding-bottom: 10%

padding-bottom: inherit

Values

<length>
Specifies a positive fixed width. See {{ Xref_csslength() }} for details.
<percentage>
A percentage with respect to the width of the containing block.

Examples

.content { padding-bottom: 5%; }
.sidebox { padding-bottom: 10px; } 

Specifications

Specification Status Comment
{{ SpecName('CSS3 Box', '#the-padding', 'padding-bottom') }} {{ Spec2('CSS3 Box') }} No change from {{ SpecName('CSS2.1', 'box.html#padding-properties', 'padding-bottom') }}.
{{ SpecName('CSS3 Transitions', '#animatable-css', 'padding-bottom') }} {{ Spec2('CSS3 Transitions') }} Defines padding-bottom as animatable.
{{ SpecName('CSS2.1', 'box.html#padding-properties', 'padding-bottom') }} {{ Spec2('CSS2.1') }} No change from {{ Specname('CSS1', '#padding-bottom', 'padding-bottom') }}.
{{ Specname('CSS1', '#padding-bottom', 'padding-bottom') }} {{ Spec2('CSS1') }} Initial definition.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 1.0 1.0 (1.0) 4.0 3.5 1.0 (85)
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

See also

  • {{ CSS_Reference:Padding() }}

Revision Source

<p>{{ CSSRef() }}</p>
<h2 id="Summary">Summary</h2>
<p><img alt="The effect of the CSS padding-bottom property on the element box" src="/files/4109/padding-bottom.svg" style="width: 400px; height: 130px; border: 1px solid; margin-right: 1em; margin-bottom: 1em; padding-right: 0.5em; float: left;" />The <code>padding-bottom</code> <a href="/en/CSS" title="CSS">CSS</a> property of an element sets the height of the padding area at the bottom of an element. The <a href="/en/CSS/box_model#padding" title="http://developer.mozilla.org/en/CSS/Box_model#padding">padding area</a> is the space between the content of the element and it's border. Contrary to {{ cssxref("margin-bottom")}} values, negative values of <code>padding-bottom</code> are invalid.</p>
<p>{{cssbox("padding-bottom")}}</p>
<h2 id="Syntax">Syntax</h2>
<pre class="twopartsyntaxbox">
<a href="/en-US/docs/CSS/Value_definition_syntax" title="CSS/Value_definition_syntax">Formal syntax</a>: {{csssyntax("padding-bottom")}}
</pre>
<pre>
padding-bottom: 0.5em;
padding-bottom: 0;
padding-bottom: 2cm;
padding-bottom: 10%

padding-bottom: inherit
</pre>
<h3 id="Values">Values</h3>
<dl>
 <dt>
  &lt;length&gt;</dt>
 <dd>
  Specifies a positive fixed width. See {{ Xref_csslength() }} for details.</dd>
 <dt>
  &lt;percentage&gt;</dt>
 <dd>
  A percentage with respect to the width of the containing block.</dd>
</dl>
<h2 id="Examples">Examples</h2>
<pre class="eval">
.content { padding-bottom: 5%; }
.sidebox { padding-bottom: 10px; } 
</pre>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{ SpecName('CSS3 Box', '#the-padding', 'padding-bottom') }}</td>
   <td>{{ Spec2('CSS3 Box') }}</td>
   <td>No change from {{ SpecName('CSS2.1', 'box.html#padding-properties', 'padding-bottom') }}.</td>
  </tr>
  <tr>
   <td>{{ SpecName('CSS3 Transitions', '#animatable-css', 'padding-bottom') }}</td>
   <td>{{ Spec2('CSS3 Transitions') }}</td>
   <td>Defines <code>padding-bottom</code> as animatable.</td>
  </tr>
  <tr>
   <td>{{ SpecName('CSS2.1', 'box.html#padding-properties', 'padding-bottom') }}</td>
   <td>{{ Spec2('CSS2.1') }}</td>
   <td>No change from {{ Specname('CSS1', '#padding-bottom', 'padding-bottom') }}.</td>
  </tr>
  <tr>
   <td>{{ Specname('CSS1', '#padding-bottom', 'padding-bottom') }}</td>
   <td>{{ Spec2('CSS1') }}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Chrome</th>
    <th>Firefox (Gecko)</th>
    <th>Internet Explorer</th>
    <th>Opera</th>
    <th>Safari (WebKit)</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>1.0</td>
    <td>1.0 (1.0)</td>
    <td>4.0</td>
    <td>3.5</td>
    <td>1.0 (85)</td>
   </tr>
  </tbody>
 </table>
</div>
<div id="compat-mobile">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Android</th>
    <th>Firefox Mobile (Gecko)</th>
    <th>IE&nbsp;Phone</th>
    <th>Opera Mobile</th>
    <th>Safari Mobile</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>{{ CompatUnknown() }}</td>
    <td>{{ CompatUnknown() }}</td>
    <td>{{ CompatUnknown() }}</td>
    <td>{{ CompatUnknown() }}</td>
    <td>{{ CompatUnknown() }}</td>
   </tr>
  </tbody>
 </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
 <li>{{ CSS_Reference:Padding() }}</li>
</ul>
Revert to this revision