Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

border-inline-end — the inline-end border

border-inline-end sets the width, style, and color of the border at the end of the inline axis. Its physical side depends on writing direction and writing mode, so it is not always the right edge.

Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required

Syntax

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

border-inline-end is a shorthand setting border-inline-end-width, border-inline-end-style, and border-inline-end-color. It affects one logical edge, unlike border-inline, which sets both ends of the inline axis.

With writing-mode: horizontal-tb, inline-end is on the right for direction: ltr and on the left for direction: rtl. In general, mapping depends on writing-mode, direction, and text-orientation; do not assume the right edge in vertical writing modes.

The || notation means one or more components may appear in any order. Omitted components reset to their initial values: medium, none, and currentcolor. Consequently, border-inline-end: 4px alone produces no visible line: the omitted style becomes none. The property is not inherited.

The example explicitly sets horizontal writing and demonstrates the edge switching through dir. Use a longhand when changing only the color, width, or style without resetting the other components.

Examples

<!doctype html>
<meta charset="utf-8">
<title>border-inline-end</title>
<style>
  .box {
    writing-mode: horizontal-tb;
    margin: 12px;
    padding: 8px;
    border: 0;
    border-inline-end: 4px solid blue;
  }
</style>
<div class="box" dir="ltr">LTR</div>
<div class="box" dir="rtl">RTL</div>

Result

LTR: 4px solid blue border on the right. RTL: 4px solid blue border on the left. No borders on the other sides.

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources