CSS border-bottom-color Property

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 4 Examples
Box Model & Color

What You’ll Learn

The border-bottom-color property sets the color of the bottom border on an element. It is useful when you want the bottom edge styled differently from the other sides.

01

Bottom Color

Physical bottom edge.

02

Color Formats

Named, hex, rgb, hsl.

03

currentColor

Matches text color.

04

Longhand

Part of border-bottom.

05

Override

Change one side only.

06

Needs Style

Pair with width/style.

Definition and Usage

The border-bottom-color CSS property specifies the color of the bottom border of an element. This property is particularly useful when you want to style the bottom border differently from the top, left, and right borders.

By customizing the bottom border color, you can create distinct visual effects and emphasize certain sections of your design, such as active tabs, footer rules, and list dividers.

💡
Beginner Tip

border-bottom-color only changes color. Add a visible border with border-bottom: 2px solid black; first, then override just the bottom color with border-bottom-color: red;.

📝 Syntax

The syntax for border-bottom-color is simple and works like other border color properties:

syntax.css
selector {
  border-bottom-color: <color>;
}

Basic Example

border-bottom-color.css
.example {
  border: 2px solid black;
  border-bottom-color: red;
}

The color value can be a named color, hexadecimal value, RGB, HSL, transparent, or any other valid CSS color.

Syntax Rules

  • This property affects only the bottom border color.
  • It does not set width or style by itself.
  • Use with border-bottom-width and border-bottom-style for full control.
  • Alternatively, use border-bottom: 2px solid red; as shorthand.
  • You can override the bottom color even when other sides use the border shorthand.

⚡ Quick Reference

QuestionAnswer
Initial valuecurrentColor
Applies toBottom border color only
InheritedNo
AnimatableYes, as a color
Common useTab underlines, section dividers, accent bottom edges, themed borders

Default Value

The default value of border-bottom-color is currentColor. That means the bottom border uses the element’s text color value unless you override it.

💎 Property Values

border-bottom-color accepts any valid CSS color value.

ValueExampleMeaning
Named colorborder-bottom-color: red;Uses a CSS color keyword such as red or blue
Hexadecimalborder-bottom-color: #000000;Uses a hex color code
RGBborder-bottom-color: rgb(0, 0, 0);Uses an RGB color function
HSLborder-bottom-color: hsl(0, 0%, 0%);Uses an HSL color function
transparentborder-bottom-color: transparent;Makes the bottom border fully transparent
currentColorborder-bottom-color: currentColor;Uses the element’s current text color
red #2563eb rgb() hsl()

Works With Other Longhands

width + color
style + color
custom color

Physical Bottom Edge

border-bottom-color always colors the visual bottom of an element, even when writing mode changes. For writing-mode-aware layouts, consider border-block-end-color instead.

Horizontal writing

Blue bottom border color

Vertical writing (vertical-rl)

Still on physical bottom

border-bottom-color vs border-block-end-color

PropertyTargetsBest for
border-bottom-colorPhysical bottom border colorSimple horizontal pages, tabs, lists, and section dividers
border-block-end-colorLogical block-end border colorMultilingual and writing-mode-aware layouts
border-bottomWidth, style, and color togetherWhen you want one shorthand for the full bottom border

👀 Live Preview

A box with a red bottom border color:

This element has a red bottom border color.

Uses border-bottom-style: solid;, border-bottom-width: 4px;, and border-bottom-color: #dc2626;.

Examples Gallery

Try border-bottom-color with red overrides, hex values, currentColor, and multi-side border customization.

📚 Basic Bottom Border Color

Set the bottom border color with the shorthand first, then override just the bottom edge.

Example 1 — Red Bottom Border Color

Change the bottom border color of a div to red while keeping the other sides black.

border-bottom-color-red.html
<style>
  .example {
    border: 2px solid black;
    border-bottom-color: red;
    padding: 0.75rem;
  }
</style>

<div class="example">
  This div has a bottom border color of red.
</div>
Try It Yourself

How It Works

The border shorthand sets all four sides. border-bottom-color: red; then overrides only the bottom edge color.

Example 2 — Hex Color Bottom Border

Use a hexadecimal color for a branded bottom accent line.

border-bottom-color-hex.css
.footer-rule {
  border-bottom: 2px solid #2563eb;
  border-bottom-color: #2563eb;
  padding-bottom: 1rem;
}
Try It Yourself

How It Works

Hex colors give precise brand control. You can set color through the shorthand first, then override only the bottom color longhand when needed.

🎨 Advanced Color Usage

Use currentColor and side-specific overrides for flexible, theme-aware bottom borders.

Example 3 — currentColor Bottom Border

Let the bottom border inherit the element’s text color automatically.

border-bottom-color-current.css
.quote {
  color: #059669;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: currentColor;
}
Try It Yourself

How It Works

currentColor keeps the border aligned with the text. Change the text color and the bottom border updates automatically.

Example 4 — Different Bottom Color on a Full Border

Give all sides a light gray border, then highlight only the bottom with a stronger accent color.

border-bottom-color-override.css
.card {
  border: 2px solid #cbd5e1;
  border-bottom-color: #2563eb;
  padding: 1rem;
  border-radius: 0.5rem;
}
Try It Yourself

How It Works

Longhand color properties override one side without resetting width or style on the other edges. This is ideal for cards and callout boxes.

🧠 How border-bottom-color Works

1

You make the border visible

Set border-bottom-style and border-bottom-width first.

Border setup
2

You choose a color

Apply any CSS color with border-bottom-color.

Color rule
3

The browser paints the bottom edge

Only the physical bottom border receives that color. You can also set border on all sides, then override just the bottom with border-bottom-color.

Bottom edge
=

Colored bottom border

Your element gets a precise color accent on the physical bottom edge.

Universal Browser Support

The border-bottom-color property is supported in all major browsers, including Chrome, Firefox, Safari, Edge, Opera, and Internet Explorer. It is one of the most reliable CSS border properties.

Baseline · All browsers

Reliable bottom border colors on every platform

Chrome, Firefox, Safari, Edge, and Opera all support border-bottom-color consistently.

100% Universal support
Google Chrome69+ · Desktop & Mobile
Full support
Mozilla Firefox66+ · Desktop & Mobile
Full support
Apple Safari12.1+ · macOS & iOS
Full support
Microsoft Edge79+ · Chromium
Full support
Opera56+ · Modern versions
Full support
border-bottom-color property 100% supported

Bottom line: Use border-bottom-color freely in any project. It works consistently across all browsers.

Conclusion

The border-bottom-color property is a straightforward yet powerful CSS tool for customizing the bottom border of an element. Whether you are aiming for a unique design or simply emphasizing a particular part of your layout, this property lets you change one edge without affecting the others.

Experiment with named colors, hex values, and currentColor to see how this property can enhance tabs, list dividers, cards, and section accents on your web pages.

💡 Best Practices

✅ Do

  • Pair border-bottom-color with style and width longhands or the shorthand
  • Use currentColor when the border should match text color
  • Prefer CSS variables for reusable theme border colors
  • Override only the bottom color when other sides already use border
  • Use transparent to hide the bottom border while keeping layout space

❌ Don’t

  • Expect color alone to create a visible border
  • Use border-bottom-color when you need a writing-mode-aware logical edge
  • Use very low-contrast border colors on important UI dividers
  • Mix physical and logical color properties without a clear reason
  • Forget that borders add to element size unless you use box-sizing: border-box

Key Takeaways

Knowledge Unlocked

Five things to remember about border-bottom-color

Use these points when coloring the physical bottom edge.

5
Core concepts
02

currentColor

Default text color.

Default
🖼️03

Any Color Format

Named, hex, rgb, hsl.

Values
⚙️04

Needs Style

Pair with width/style.

Setup
🛠05

One-Side Override

Other sides unchanged.

Scope

❓ Frequently Asked Questions

The border-bottom-color property sets the color of the bottom border of an element. It only affects the physical bottom edge.
The initial value is currentColor, which uses the element's text color for the bottom border.
This property only sets color. You also need a visible border-bottom-style such as solid and border-bottom-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.
Use it when you want to color only the bottom border separately from the top, left, and right borders.

Practice in the Live Editor

Open the HTML editor, try border-bottom-color, and preview colored bottom borders instantly.

HTML Editor →

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.

5 people found this page helpful