CSS Portal

CSS border-block-end-width Property

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The border-block-end-width property controls the thickness of an element’s border on the logical “end” side of the block axis. As a logical property, it is written relative to the flow of content rather than the physical top/right/bottom/left edges; that makes it useful in responsive and internationalized layouts where the block axis or inline direction may change. When you adjust this property you are changing how much space the border occupies along that block-end edge, which affects the visual weight of the border and how it contributes to the element’s overall box dimensions.

Because it’s a border width property, its visible effect depends on the corresponding border style being present - a width has no visible result if the border style on that side is not rendered. If you need to coordinate the appearance, consider the relationship with border-style (which controls whether a border is drawn and how it looks). Similarly, this property is one piece of the logical border set and is often used alongside the shorthand border-block-end (which groups the block-end border’s width, style and color) or with the broader border-block and border-width shorthands that set values for both block-start and block-end or all logical sides in a single declaration.

Because mapping from logical to physical sides depends on writing mode and text direction, the physical edge affected by border-block-end-width can differ between documents. The element’s writing mode (controlled by properties such as writing-mode) and the block flow determine which physical side receives the width you specify; this makes the property particularly valuable for authoring stylesheets that must work consistently across horizontal and vertical text flows or left-to-right and right-to-left contexts. In the cascade, longhand declarations of this property will override earlier shorthands that set the same logical side if they have equal specificity and later order.

In practical use, designers and developers rely on border-block-end-width to tune the visual separation at the end of a block container without hardcoding physical sides, simplifying maintenance when layouts need to support multiple writing systems. Be mindful that changing border widths affects layout: borders contribute to the element’s box and can trigger layout recalculations, so frequent dynamic changes (for example, in animations) may have performance implications depending on how they’re applied.

Definition

Initial value
medium
Applies to
all elements
Inherited
no
Computed value
absolute length; 0 if the border style is none or hidden
Animatable
by computed value type
JavaScript syntax
object.style.borderBlockEndWidth

Interactive Demo

Example of the Border
Block End Width Property

Syntax

border-block-end-width: <border-width>

Values

  • <border-width>Specifies the width of the border

Example

<div class="container">
<h1>border-block-end-width demonstration</h1>
<div class="card box-small">Small (2px)</div>
<div class="card box-medium">Medium (6px)</div>
<div class="card box-large">Large (12px)</div>
</div>
/* Container and typography */
.container {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  max-width: 680px;
  margin: 40px auto;
  padding: 16px;
}

h1 {
  font-size: 18px;
  margin: 0 0 12px 0;
}

/* Card base styles */
.card {
  padding: 16px;
  margin: 12px 0;
  background: #f7f7f8;
  border-block-end-style: solid; /* shows the logical "end" edge */
  border-block-end-color: #1a73e8;
  border-radius: 6px;
}

/* Different border-block-end-width values */
.box-small {
  border-block-end-width: 2px;
}

.box-medium {
  border-block-end-width: 6px;
}

.box-large {
  border-block-end-width: 12px;
}

Browser Support

The following information will show you the current browser support for the CSS border-block-end-width property. Hover over a browser icon to see the version that first introduced support for this CSS property.

This property is supported by all modern browsers.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 1st January 2026

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!