CSS border-bottom-color Property

Beginner
5 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The border-bottom-color property sets the color of an element’s physical bottom border. It is one longhand of border-bottom, together with border-bottom-width and border-bottom-style.

The initial value is currentColor, so the border follows the element’s color unless you override it. For a writing-mode-aware end edge, use border-block-end-color. To set all four sides at once, use border-color.

Standard-track.

Not deprecated. Supported in every major browser for many years, including Internet Explorer 4+.

Experimental.

Newer specs allow some image-based border colors (such as stripes()). Stick to normal <color> values for reliable support.

CSS Syntax

syntax.css
border-bottom-color: <color> | initial | inherit;

The initial value is currentColor. Any valid CSS color works: named colors, hex, rgb(), hsl(), and more.

Property Values

ValueDescriptionTry it
<color>Any CSS color, such as #1d4ed8, crimson, or rgb(15 118 110)Try it
currentColorDefault. Uses the element color valueTry it
transparentFully transparent. The border still takes space if width and style are setTry it
initialSets this property to its default value, currentColorTry it
inheritInherits this property from the parent elementTry it

How to Use border-bottom-color

Show a bottom border first, then change only its color.

  1. Set a visible border-bottom-style such as solid.
  2. Set border-bottom-width greater than 0 (for example 4px).
  3. Set border-bottom-color to the color you want.
  4. Or use border-bottom to set width, style, and color together.
PieceRequired?Role
Visible styleYesWithout solid (or another visible style), color has nothing to paint
WidthYesA width of 0 hides the border
ColorOptionalDefaults to currentColor if omitted

Live Preview

Width and style stay fixed at 4px solid. Change only border-bottom-color.

Only the bottom border color changes. For currentColor, the text color is amber.

Bottom color

Bottom edge

border-bottom-color: #1d4ed8

CSS Examples

Each snippet keeps width and style fixed so you can focus on border-bottom-color. Use Try It Yourself for a live editor.

Example 1 — Hex Color

A solid bottom border with an explicit hex color.

CSS
<style>
  p {
    border-bottom-width: 4px;
    border-bottom-style: solid;
    border-bottom-color: #1d4ed8;
  }
</style>

<p>Blue bottom border</p>
Try It Yourself

How It Works

  1. Draw a line. border-bottom-style: solid and 4px create a visible bottom edge.
  2. Color that edge. border-bottom-color: #1d4ed8 paints only the bottom border.
  3. Leave other sides alone. Top, left, and right stay unchanged.
  4. Same as the shorthand. This matches border-bottom: 4px solid #1d4ed8.

Example 2 — Match the Text Color

currentColor ties the border to the element color.

CSS
<style>
  p {
    color: #b45309;
    border-bottom-width: 4px;
    border-bottom-style: solid;
    border-bottom-color: currentColor;
  }
</style>

<p>Matches text color</p>
Try It Yourself

How It Works

  1. Set the text color. color: #b45309 makes the words amber.
  2. Reuse that color. currentColor copies the computed text color onto the border.
  3. Keep width and style. Without them, there is still no visible line.
  4. Default behavior. If you omit border-bottom-color, the browser already uses currentColor.

Example 3 — Transparent Color

The border stays in the layout, but you cannot see its paint.

CSS
<style>
  p {
    border-bottom-width: 4px;
    border-bottom-style: solid;
    border-bottom-color: transparent;
  }
</style>

<p>Invisible paint</p>
Try It Yourself

How It Works

  1. Keep width and style. The bottom edge still occupies 4px.
  2. Clear the paint. transparent makes that edge invisible.
  3. Not the same as none. border-bottom-style: none removes the border. Transparent keeps the space.
  4. Useful for swaps. You can reserve space, then switch to a visible color on hover or focus.

Edge Cases & Pitfalls

If the color seems missing, check style and width before blaming the color value.

style

Color needs a visible border

With the default border-bottom-style: none, no color can show. Set border-bottom-style: solid (and a width), or use border-bottom.

shorthand

border-bottom can wipe the color

A later border-bottom: 2px solid resets color to currentColor. Put the color in the shorthand, or set border-bottom-color after it.

physical

Always the physical bottom

Vertical writing modes do not move this edge. Use border-block-end-color when the color must follow the block axis.

transparent

Transparent is not none

transparent keeps the border box size. none removes the border. Pick the one that matches the layout you want.

default

Default follows text color

If you never set this property, the border uses currentColor. Changing color can change the border too.

Browser Support

border-bottom-color is a browser style property. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Widely available

border-bottom-color

Chrome 1+, Firefox 1+, Safari 1+, Edge 12+, Opera 3.5+, Internet Explorer 4+. Safe everywhere in practice.

99% global support
Google Chrome 1+
Full support
Mozilla Firefox 1+
Full support
Apple Safari 1+
Full support
Microsoft Edge 12+
Full support
Opera 3.5+
Full support
Samsung Internet 1+
Full support
Internet Explorer 4+
Full support
border-bottom-color Universally supported

Bottom line: Normal color values are universal. Newer image-based border colors are not needed for everyday work and may still be missing in some browsers.

Key Takeaways

  • Role: set the color of the physical bottom border only.
  • Default: currentColor, so the border can follow the text color.
  • Needs a line: pair with width and a visible style.
  • Physical edge: for logical block-end, use border-block-end-color.

One line: border-bottom-color paints the bottom edge after width and style are set.

Frequently Asked Questions

It sets the color of the physical bottom border only. The other three sides stay unchanged unless you set them separately.
The initial value is currentColor, which uses the element text color for the bottom border.
Color alone is not enough. You also need a visible border-bottom-style such as solid and a width greater than zero, or use the border-bottom shorthand.
border-bottom-color always colors the physical bottom edge. border-block-end-color follows the writing mode and stays on the logical block-end side.
currentColor makes the bottom border use the same color as the element color property. Change the text color, and the border color follows.
It is supported in all modern browsers and goes back to Chrome 1, Firefox 1, Safari 1, Edge 12, Opera 3.5, and Internet Explorer 4. It is a browser style property, not a Node.js feature.

Next: border-bottom-left-radius

Round only the bottom-left corner of a box.

border-bottom-left-radius tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful