border-bottom-color

  • Revision slug: Web/CSS/border-bottom-color
  • Revision title: border-bottom-color
  • Revision id: 415715
  • Created:
  • Creator: vim-chhetri
  • Is current revision? No
  • Comment

Revision Content

{{ CSSRef() }}

Summary

The border-bottom-color CSS property sets the color of the bottom border of an element. Note that in many cases the shorthand CSS properties {{ cssxref("border-color") }} or {{ cssxref("border-bottom") }} are more convenient and preferable.

{{cssbox("border-bottom-color")}}

Syntax

Formal syntax: {{csssyntax("border-bottom-color")}}

Values

<color>
Is a {{ Xref_csscolorvalue() }} CSS value describing the color of the bottom border.
inherit
Is a keyword denoting the color of the bottom border of the parent's element (which may be different from the border-bottom-color default value)

Examples

pre {
    border: solid 0.3em gold;
    border-bottom-color: red;
}
<pre>Here is an example of some text in a pre block with gold borders except on the bottom which is red.</pre>

{{ EmbedLiveSample('Examples','750','60') }}

Specifications

Specification Status Comment
{{ SpecName('CSS3 Backgrounds', '#border-bottom-color', 'border-bottom-color') }} {{ Spec2('CSS3 Backgrounds') }} No significant changes, though the transparent keyword, now included in {{ xref_csscolorvalue() }} which has been extended, has been formally removed.
{{ SpecName('CSS2.1', 'box.html#border-color-properties', 'border-bottom-color') }} {{ Spec2('CSS2.1') }}  

Browser Compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 1.0 {{ CompatGeckoDesktop("1.0") }} [1] 4 3.5 1.0 (85)
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support 1.0 {{ CompatGeckoMobile("1.0") }} [1] {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }}

[1] Gecko-based browsers like Firefox also supports the non-standard {{ Cssxref("-moz-border-bottom-colors") }} CSS properties that sets the top border to multiple colors.

See also

  • The border-related CSS shorthand properties {{ Cssxref("border") }}, {{ Cssxref("border-bottom") }}, and {{ Cssxref("border-color") }}.
  • The color-related CSS properties applying to the other borders: {{ Cssxref("border-right-color") }}, {{ Cssxref("border-top-color") }}, and {{ Cssxref("border-left-color") }}.
  • The other border-related CSS properties applying to the same border: {{ cssxref("border-bottom-style") }} and {{ cssxref("border-bottom-width") }}.

Revision Source

<p>{{ CSSRef() }}</p>
<h2 id="Summary">Summary</h2>
<p>The <code>border-bottom-color</code> CSS property sets the color of the bottom border of an element. Note that in many cases the shorthand CSS properties {{ cssxref("border-color") }} or {{ cssxref("border-bottom") }} are more convenient and preferable.</p>
<p>{{cssbox("border-bottom-color")}}</p>
<h2 id="Syntax">Syntax</h2>
<pre class="syntaxbox">
<a href="/en-US/docs/CSS/Value_definition_syntax" title="/en-US/docs/CSS/Value_definition_syntax">Formal syntax</a>: {{csssyntax("border-bottom-color")}}
</pre>
<h3 id="Values">Values</h3>
<dl>
  <dt>
    <code>&lt;color&gt;</code></dt>
  <dd>
    Is a {{ Xref_csscolorvalue() }} CSS value describing the color of the bottom border.</dd>
  <dt>
    <code>inherit</code></dt>
  <dd>
    Is a keyword denoting the color of the bottom border of the parent's element (which may be different from the <code>border-bottom-color</code> default value)</dd>
</dl>
<h2 id="Examples">Examples</h2>
<pre class="brush: css; highlight:[3]">
pre {
    border: solid 0.3em gold;
    border-bottom-color: red;
}
</pre>
<pre class="brush: html">
&lt;pre&gt;Here is an example of some text in a pre block with gold borders except on the bottom which is red.&lt;/pre&gt;</pre>
<p>{{ EmbedLiveSample('Examples','750','60') }}</p>
<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 Backgrounds', '#border-bottom-color', 'border-bottom-color') }}</td>
      <td>{{ Spec2('CSS3 Backgrounds') }}</td>
      <td>No significant changes, though the <code>transparent</code> keyword, now included in {{ xref_csscolorvalue() }} which has been extended, has been formally removed.</td>
    </tr>
    <tr>
      <td>{{ SpecName('CSS2.1', 'box.html#border-color-properties', 'border-bottom-color') }}</td>
      <td>{{ Spec2('CSS2.1') }}</td>
      <td>&nbsp;</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>{{ CompatGeckoDesktop("1.0") }} [1]</td>
        <td>4</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>1.0</td>
        <td>{{ CompatGeckoMobile("1.0") }} [1]</td>
        <td>{{ CompatVersionUnknown() }}</td>
        <td>{{ CompatVersionUnknown() }}</td>
        <td>{{ CompatVersionUnknown() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<p>[1] Gecko-based browsers like Firefox also supports the non-standard {{ Cssxref("-moz-border-bottom-colors") }} CSS properties that sets the top border to <strong>multiple</strong> colors.</p>
<h3 id="See_also">See also</h3>
<ul>
  <li>The border-related CSS shorthand properties {{ Cssxref("border") }}, {{ Cssxref("border-bottom") }}, and {{ Cssxref("border-color") }}.</li>
  <li>The color-related CSS properties applying to the other borders: {{ Cssxref("border-right-color") }}, {{ Cssxref("border-top-color") }}, and {{ Cssxref("border-left-color") }}.</li>
  <li>The other border-related CSS properties applying to the same border: {{ cssxref("border-bottom-style") }} and {{ cssxref("border-bottom-width") }}.</li>
</ul>
Revert to this revision