CSS border-block-end-color Property

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

What You’ll Learn

The border-block-end-color property sets the color of the block-end border on an element. In horizontal writing, that usually means the bottom border color.

01

Block-End Color

One logical edge only.

02

Color Formats

Named, hex, rgb, hsl.

03

currentColor

Matches text color.

04

Longhand

Part of border-block-end.

05

Writing Modes

Adapts to text flow.

06

Needs Style

Pair with width/style.

Definition and Usage

The border-block-end-color CSS property sets the color of an element’s block-end border. In languages written top to bottom, such as English, block-end usually corresponds to the bottom edge of the element.

This property is part of CSS logical properties, which let you control layout and borders in a way that adapts to different writing modes such as right-to-left or vertical text.

💡
Beginner Tip

border-block-end-color only changes color. Add border-block-end-style: solid; and border-block-end-width: 4px; so the border is visible, or use the border-block-end shorthand instead.

📝 Syntax

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

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

Basic Example

border-block-end-color.css
div {
  border-block-end-style: solid;
  border-block-end-width: 4px;
  border-block-end-color: red;
}

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

Syntax Rules

  • This property affects only the block-end border color.
  • It does not set width or style by itself.
  • Use with border-block-end-width and border-block-end-style for full control.
  • Alternatively, use border-block-end: 4px solid red; as shorthand.
  • The color follows writing mode and stays on the logical block-end edge.

⚡ Quick Reference

QuestionAnswer
Initial valuecurrentColor
Applies toBlock-end border color only
InheritedNo
AnimatableYes, as a color
Common useSection dividers, footer rules, themed block-end accents

Default Value

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

💎 Property Values

border-block-end-color accepts any valid CSS color value.

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

Works With Other Longhands

width + color
style + color
custom color

Block-End Color and Writing Modes

The block-end edge follows the block axis, so the same color rule adapts when writing mode changes.

Horizontal writing

Blue block-end (bottom) border color

Vertical writing (vertical-rl)

Logical block-end color

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

PropertyTargetsBest for
border-block-end-colorLogical block-end border colorMultilingual and writing-mode-aware layouts
border-bottom-colorPhysical bottom border colorSimple horizontal pages with fixed bottom accents
border-block-endWidth, style, and color togetherWhen you want one shorthand for the full block-end border

👀 Live Preview

A box with a red block-end border color:

This element has a red block-end border color.

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

Examples Gallery

Try border-block-end-color with red borders, hex values, currentColor, and vertical writing mode.

📚 Basic Block-End Color

Set the block-end border color with longhand properties for width, style, and color.

Example 1 — Red Block-End Border Color

Set the block-end border color of a div to red.

border-block-end-color-red.html
<style>
  div {
    border-block-end-style: solid;
    border-block-end-width: 4px;
    border-block-end-color: red;
    padding-block-end: 0.75rem;
  }
</style>

<div>This div has a red block-end border.</div>
Try It Yourself

How It Works

Color alone is not enough. The visible red line appears because style and width are also set on the block-end edge.

Example 2 — Hex Color Block-End Border

Use a hexadecimal color for a branded block-end accent line.

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

How It Works

You can set color through the shorthand first, then override only the color longhand when needed for theme variations.

🎨 Advanced Color Usage

Use currentColor and writing modes when building flexible, theme-aware logical borders.

Example 3 — currentColor Block-End Border

Let the block-end border inherit the element’s text color automatically.

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

How It Works

currentColor keeps the border aligned with the text. Change the text color and the block-end border updates automatically.

Example 4 — Block-End Color in Vertical Writing Mode

See how block-end border color follows the writing mode instead of staying on the physical bottom.

border-block-end-color-vertical.css
.vertical-panel {
  writing-mode: vertical-rl;
  border-block-end-style: solid;
  border-block-end-width: 3px;
  border-block-end-color: #7c3aed;
  padding: 1rem;
}
Try It Yourself

How It Works

With writing-mode: vertical-rl, block-end no longer means physical bottom, but the purple color still applies to the correct logical edge.

🧠 How border-block-end-color Works

1

You make the border visible

Set border-block-end-style and border-block-end-width first.

Border setup
2

You choose a color

Apply any CSS color with border-block-end-color.

Color rule
3

The browser maps it to block-end

Only the logical block-end edge receives that color based on writing mode.

Logical mapping
=

Colored block-end border

Your element gets a precise color accent on the logical end edge.

Universal Browser Support

border-block-end-color is supported in all modern browsers as part of the CSS Logical Properties module. Internet Explorer does not support it.

Baseline · Modern browsers

Logical border colors in today’s browsers

Chrome, Firefox, Safari, Edge, and Opera support border-block-end-color in current versions.

96% Modern browser 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

Fallback behavior

For older browsers, use border-bottom-color as a physical fallback in horizontal layouts.

💻
Internet Explorer No support · Use border-bottom-color instead
None
border-block-end-color property 96% supported

Bottom line: Use border-block-end-color confidently in modern logical layout systems.

Conclusion

The border-block-end-color property provides a flexible way to control the color of an element’s block-end border in layouts that may use different writing modes and text directions.

Experiment with named colors, hex values, and currentColor to see how this property can enhance your design while staying compatible with logical CSS layout systems.

💡 Best Practices

✅ Do

  • Pair border-block-end-color with style and width longhands
  • Use currentColor when the border should match text color
  • Prefer CSS variables for reusable theme border colors
  • Test block-end colors in vertical writing mode when needed
  • Use the shorthand when setting width, style, and color together

❌ Don’t

  • Expect color alone to create a visible border
  • Assume block-end always equals physical bottom
  • Use very low-contrast border colors on important UI dividers
  • Mix physical and logical color properties without a reason
  • Skip fallbacks only when older browser support is required

Key Takeaways

Knowledge Unlocked

Five things to remember about border-block-end-color

Use these points when coloring the logical block-end 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

Writing Mode

Adapts to flow.

Context

❓ Frequently Asked Questions

The border-block-end-color property sets the color of the border on the block-end side of an element. In horizontal writing, that is usually the bottom border color.
The initial value is currentColor, which uses the element's text color for the block-end border.
This property only sets color. You also need border-block-end-style such as solid and border-block-end-width greater than zero, or use the border-block-end 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 block-end border separately from other edges, especially in logical layouts that may change writing mode.

Practice in the Live Editor

Open the HTML editor, try border-block-end-color, and preview logical block-end 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