border-bottom-width

  • Revision slug: CSS/border-bottom-width
  • Revision title: border-bottom-width
  • Revision id: 21000
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment one or more formatting changes

Revision Content

{{ CSSRef() }}

Summary

The border-bottom-width CSS property sets the width of the bottom border of a box.

  • {{ Xref_cssinitial() }}: medium
  • Applies to: all elements
  • {{ Xref_cssinherited() }}: no
  • Percentages: N/A
  • Media: {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }}: an absolute {{ xref_csslength() }}, but 0 if the border style resolved to none or hidden.

Syntax

border-bottom-width: border-width   or
border-bottom-width: inherit

where:

border-width
Is either a non-negative explicit {{ xref_csslength() }} value or a keyword denoting the thickness of the bottom border. The keyword must be one of the following values:
thin
fake
A thin border
medium
fake
A medium border
thick
fake
A thick border
The specification doesn't define precisely the thickness of each fo the keywords, which is therefore implementation specific. Nevertheless, it requests that the thickness does verify the thin ≤ medium ≤ thick inequality and is constant on a single document.
inherit
Represents the calculated value of the border-bottom-width of the parent's element.

Examples

{{ CSSRefExampleLink("border") }}

element { 
    border-bottom-width: thin;
    border-bottom-style: solid;
    border-bottom-color: #000;
}

Specifications

Specification Status Comment
CSS Backgrounds and Borders Module Level 3 {{ Spec2('CSS3 Backgrounds') }} No direct change, the {{ xref_csslength() }} CSS data type extension has an effect on this property.
CSS 2.1 {{ Spec2('CSS2.1') }} Added the constraint that values' meaning must be constant inside a document.
CSS 1 {{ Spec2('CSS1') }}  

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

  • The other border-width-related CSS properties: {{ Cssxref("border-left-width") }}, {{ Cssxref("border-right-width") }}, {{ Cssxref("border-top-width") }}, and {{ Cssxref("border-width") }}
  • The other border-bottom-related CSS properties: {{ Cssxref("border") }}, {{ Cssxref("border-bottom") }}, {{ Cssxref("border-bottom-style") }}, and {{ Cssxref("border-bottom-color") }}.

{{ languages( { "de": "de/CSS/border-bottom-width", "fr": "fr/CSS/border-bottom-width", "ja": "ja/CSS/border-bottom-width", "pl": "pl/CSS/border-bottom-width", "es": "es/CSS/border-bottom-width" } ) }}

Revision Source

<p>{{ CSSRef() }}</p>
<h2 name="Summary">Summary</h2>
<p>The <code>border-bottom-width</code> <a href="/en/CSS" title="CSS">CSS</a> property sets the width of the bottom border of a box.</p>
<ul class="cssprop"> <li>{{ Xref_cssinitial() }}: <code>medium</code></li> <li>Applies to: all elements</li> <li>{{ Xref_cssinherited() }}: no</li> <li>Percentages: N/A</li> <li>Media: {{ Xref_cssvisual() }}</li> <li>{{ Xref_csscomputed() }}: an absolute {{ xref_csslength() }}, but <code>0</code> if the border style resolved to <code>none</code> or <code>hidden</code>.</li>
</ul><h2 name="Syntax">Syntax</h2>
<pre class="eval syntaxbox">border-bottom-width: <em>border-width</em>   or
border-bottom-width: inherit
</pre>
<p>where:</p>
<dl> <dt><em>border-width</em></dt> <dd>Is either a non-negative explicit {{ xref_csslength() }} value or a keyword denoting the thickness of the bottom border. The keyword must be one of the following values: <table class="standard-table"> <tbody> <tr> <td style="vertical-align:middle;"><code>thin</code></td> <td style="vertical-align:middle;"> <div style="margin:0.5em; width:3em; height:3em; border-bottom-style:solid; border-bottom-width:thin; background-color:palegreen;"><span style="display:none;">fake</span></div> </td> <td style="vertical-align:middle;">A thin border</td> </tr> <tr> <td style="vertical-align:middle;"><code>medium</code></td> <td style="vertical-align:middle;"> <div style="margin:0.5em; width:3em; height:3em; border-bottom-style:solid; border-bottom-width:medium; background-color:palegreen;"><span style="display:none;">fake</span></div> </td> <td style="vertical-align:middle;">A medium border</td> </tr> <tr> <td style="vertical-align:middle;"><code>thick</code></td> <td style="vertical-align:middle;"> <div style="margin:0.5em; width:3em; height:3em; border-bottom-style:solid; border-bottom-width:thick; background-color:palegreen;"><span style="display:none;">fake</span></div> </td> <td style="vertical-align:middle;">A thick border</td> </tr> </tbody> </table> The specification doesn't define precisely the thickness of each fo the keywords, which is therefore implementation specific. Nevertheless, it requests that the thickness does verify the <code>thin ≤ medium ≤ thick</code> inequality and is constant on a single document.</dd> <dt>inherit</dt> <dd>Represents the calculated value of the <code>border-bottom-width</code> of the parent's element.</dd>
</dl><h2 name="Examples">Examples</h2>
<p>{{ CSSRefExampleLink("border") }}</p>
<pre>element { 
    border-bottom-width: thin;
    border-bottom-style: solid;
    border-bottom-color: #000;
}
</pre>
<h2 name="Specifications">Specifications</h2>
<table class="standard-table"> <thead> <tr style="background-color: rgb(255, 204, 255);"> <th scope="col">Specification</th> <th scope="col">Status</th> <th scope="col">Comment</th> </tr> </thead> <tbody> <tr> <td><a class="external" href="http://www.w3.org/TR/css3-background/#the-border-width" title="http://www.w3.org/TR/css3-background/#the-border-width">CSS Backgrounds and Borders Module Level 3</a></td> <td>{{ Spec2('CSS3 Backgrounds') }}</td> <td>No direct change, the {{ xref_csslength() }} CSS data type extension has an effect on this property.</td> </tr> <tr> <td><a class="external" href="http://www.w3.org/TR/CSS21/box.html#border-width-properties" title="http://www.w3.org/TR/CSS21/box.html#border-width-properties">CSS 2.1</a></td> <td>{{ Spec2('CSS2.1') }}</td> <td>Added the constraint that values' meaning must be constant inside a document.</td> </tr> <tr> <td><a class="external" href="http://www.w3.org/TR/CSS1#border-width">CSS 1</a> </td> <td>{{ Spec2('CSS1') }}</td> <td> </td> </tr> </tbody>
</table>
<h2 name="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 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 name="See_Also">See Also</h2>
<ul> <li>The other border-width-related CSS properties: {{ Cssxref("border-left-width") }}, {{ Cssxref("border-right-width") }}, {{ Cssxref("border-top-width") }}, and {{ Cssxref("border-width") }}</li> <li>The other border-bottom-related CSS properties: {{ Cssxref("border") }}, {{ Cssxref("border-bottom") }}, {{ Cssxref("border-bottom-style") }}, and {{ Cssxref("border-bottom-color") }}.</li>
</ul>
<p>{{ languages( { "de": "de/CSS/border-bottom-width", "fr": "fr/CSS/border-bottom-width", "ja": "ja/CSS/border-bottom-width", "pl": "pl/CSS/border-bottom-width", "es": "es/CSS/border-bottom-width" } ) }}</p>
Revert to this revision