CSS Portal

CSS border-inline-end Property

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

Description

The CSS property border-inline-end targets the border on the logical inline-axis at the end edge of an element. It exists to let authors style borders in a writing-mode– and direction–agnostic way, so you can declare borders relative to the text flow rather than fixed physical edges. Using the logical form makes styles more robust when supporting vertical text, different languages, or dynamically flipped directions.

Which physical edge the border-inline-end value affects depends on the element’s text flow and directionality: it maps to the left or right physical side in horizontal writing modes and to the appropriate side in vertical modes. The mapping is governed by the document’s orientation rules, which are in turn determined by properties such as writing-mode and direction. Because it follows the inline axis, changing those properties can move the border to a different physical edge without changing the logical declaration.

border-inline-end participates in the same cascade and specificity rules as other border properties: a statement using this logical longhand will override the corresponding value supplied by a less-specific shorthand. For example, declarations made with the generic border shorthand can be overridden by a later border-inline-end declaration, and vice versa depending on origin and specificity. It also composes conceptually from the same underlying border characteristics - style, width, and color - even though you may set those with other longhands or shorthands.

In practice, this logical border behaves like other borders in painting, hit-testing, and layout: it contributes to the element’s visual edge, participates in box-model calculations, and will be affected by interactions such as collapsing borders in table contexts or clipping by overflow. Because it is a logical property, it simplifies authoring responsive and internationalized UIs: you can apply a border “at the inline end” once and have it appear correctly across writing modes and language directions without changing selectors or duplicating rules.

Definition

Initial value
See individual properties
Applies to
all elements
Inherited
no
Computed value
See individual properties
Animatable
See individual properties
JavaScript syntax
object.style.borderInlineEnd

Interactive Demo

Example of the Border
Inline End Property

Syntax

border-inline-end: <border-width> | <border-style> | <color>

Values

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

Example

<div class="container">
<h2>border-inline-end examples</h2>
<div class="box ltr" dir="ltr">
LTR: border-inline-end appears on the right
</div>
<div class="box rtl" dir="rtl">
RTL: border-inline-end appears on the left
</div>
<div class="box vertical" dir="ltr">
Vertical (writing-mode: vertical-rl)
</div>
</div>
.container {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  max-width: 700px;
  margin: 20px auto;
  gap: 12px;
  display: flex;
  flex-direction: column;
}

h2 {
  margin: 0 0 8px 0;
  font-size: 16px;
}

.box {
  padding: 12px 16px;
  background: #f8fafb;
  border: 1px solid #e3e7eb;
  border-inline-end: 6px solid #0b76cc;
  border-radius: 6px;
}

.box.rtl {
  /* dir="rtl" on the element flips inline start/end */
}

.box.vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  width: 4.5rem;
  padding: 8px;
}

Browser Support

The following information will show you the current browser support for the CSS border-inline-end 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!