CSS border-inline-end Property

Beginner
⏱️ 7 min read
📚 Updated: Jul 2026
🎯 4 Examples
Box Model & Layout

What You’ll Learn

The border-inline-end property sets a border on the inline-end side — the trailing edge along the text flow direction.

01

Inline-End

Trailing side.

02

Shorthand

Width, style, color.

03

LTR / RTL

Direction-aware.

04

Logical

Not left/right.

05

Longhands

width, style, color.

06

i18n Ready

Multilingual UI.

Definition and Usage

The border-inline-end CSS property is a logical shorthand that sets the border on the inline-end side of an element. It combines border-inline-end-width, border-inline-end-style, and border-inline-end-color in one declaration.

This property is part of CSS logical properties and adapts to writing mode and text direction. In horizontal left-to-right text, inline-end is usually the right side. In right-to-left text, it is usually the left side — without changing your CSS.

💡
Beginner Tip

Think of inline-end as the side where reading finishes. In English (LTR), that is typically the right edge. Use border-inline-end instead of border-right when your layout must work in RTL too.

📝 Syntax

border-inline-end accepts border width, style, and color like other border shorthands:

syntax.css
selector {
  border-inline-end: width style color;
}

Basic Example

border-inline-end.css
div {
  border-inline-end: 4px solid red;
}

Syntax Rules

  • Sets width, style, and color for the inline-end side only.
  • Omitted components use initial values: medium, none, currentcolor.
  • Any valid border width, style, and color values are accepted.
  • The physical side mapped to inline-end depends on direction and writing-mode.
  • Use longhands when you need to set only width, style, or color on inline-end.

⚡ Quick Reference

QuestionAnswer
Initial valuemedium none currentcolor
Applies toInline-end border side only
InheritedNo
AnimatablePartially (color and width)
Common useEnd dividers, RTL-safe trailing borders, list separators

Default Value

The default value of border-inline-end is medium none currentcolor. No visible border appears until you set a non-none style and a width greater than zero.

💎 Property Values

ComponentExampleMeaning
border-width4px, thin, 0.25remThickness of the inline-end border
border-stylesolid, dashed, dottedHow the inline-end border is drawn
border-colorred, #2563eb, currentcolorColor of the inline-end border

Common Value Types

4px solidsolid end border
3px dasheddashed style
6px solidthick accent

Inline-End and Writing Modes

border-inline-end always targets the end of the inline axis. The physical side changes with text direction, but the logical meaning stays the same.

LTR (direction: ltr)

Inline-end border (usually right)

RTL (direction: rtl)

Inline-end border (usually left)

border-inline-end vs related properties

PropertyTargetsBest for
border-inline-endInline-end side onlyTrailing edge borders that follow text direction
border-inline-startInline-start side onlyLeading edge borders at the start of text flow
border-inlineBoth inline-start and inline-endMatching borders on both inline sides
border-rightPhysical right sideFixed LTR-only layouts

👀 Live Preview

A box with a red border on the inline-end side:

Red border on the inline-end side.

Uses border-inline-end: 4px solid #dc2626;.

Examples Gallery

Try border-inline-end with solid borders, quote dividers, RTL text, and dashed styles.

📚 Basic Inline-End Borders

Add a border on the trailing inline side of an element.

Example 1 — 4px Solid Red Border

Add a solid red border on inline-end, matching the reference tutorial.

border-inline-end-basic.html
<style>
  div {
    border-inline-end: 4px solid red;
    padding: 0.75rem 1rem;
  }
</style>

<div>This div has a red border on the inline-end side.</div>
Try It Yourself

How It Works

In LTR horizontal text, inline-end is usually the right side. The shorthand sets width, style, and color on that one logical edge.

Example 2 — End Divider in a List Item

Use inline-end borders as separators between horizontal list items.

border-inline-end-list.css
.nav-item {
  padding: 0.5rem 1rem;
  border-inline-end: 1px solid #cbd5e1;
}

.nav-item:last-child {
  border-inline-end: none;
}
Try It Yourself

How It Works

Each item gets a divider on inline-end. In RTL navigation, those dividers automatically appear on the correct trailing side of each item.

🎨 RTL and Style Variations

Test inline-end borders in RTL and with different styles.

Example 3 — RTL Layout

The same inline-end border rule adapts when text direction is right-to-left.

border-inline-end-rtl.html
<style>
  .rtl-box {
    direction: rtl;
    padding: 0.75rem 1rem;
    border-inline-end: 4px solid #059669;
    background: #ecfdf5;
  }
</style>

<div class="rtl-box">
  حد منطقي على الجانب النهائي
</div>
Try It Yourself

How It Works

In RTL, inline-end maps to the left side. You do not need a separate border-left rule — the logical property handles the swap.

Example 4 — Dashed Inline-End Border

Use a dashed style for a lighter trailing-edge accent.

border-inline-end-dashed.css
.note {
  padding: 0.75rem 1rem;
  border-inline-end: 3px dashed #7c3aed;
  background: #faf5ff;
}
Try It Yourself

How It Works

Any valid border style works on inline-end. A dashed trailing border adds visual separation without a full box outline.

🧠 How border-inline-end Works

1

Browser reads direction

Writing mode and direction define which side is inline-end.

Context
2

Shorthand sets the end border

border-inline-end applies width, style, and color on that side only.

Apply
3

Physical side is mapped

In LTR, inline-end is usually right. In RTL, it is usually left.

Mapping
=

Trailing inline border

Your element shows a border on the logical end edge of the text flow.

Modern Browser Support

The border-inline-end property is supported in all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera.

Baseline · Modern browsers

Logical inline-end borders in today’s browsers

Chrome, Edge, Firefox, Safari, and Opera support border-inline-end in LTR and RTL layouts.

94% Modern browser support
Google Chrome87+ · Desktop & Mobile
Full support
Mozilla Firefox66+ · Desktop & Mobile
Full support
Apple Safari14.1+ · macOS & iOS
Full support
Microsoft Edge87+ · All versions
Full support
Opera73+ · Modern versions
Full support
border-inline-end property 94% supported

Bottom line: Use border-inline-end for direction-aware trailing borders in modern multilingual projects.

Conclusion

The border-inline-end property is a focused logical shorthand for borders on the trailing inline side. It keeps your CSS correct in LTR and RTL layouts without separate left and right rules.

Use it for dividers, accent edges, and any design where the border should follow where the text flow ends.

💡 Best Practices

✅ Do

  • Use border-inline-end for trailing dividers in multilingual nav
  • Pair with padding so content does not touch the border
  • Prefer logical properties over border-right when direction may change
  • Test in both LTR and RTL before shipping
  • Remove inline-end borders on the last item with :last-child

❌ Don’t

  • Assume inline-end is always the physical right side
  • Mix conflicting border-right and border-inline-end rules
  • Use inline-end borders when you need all four sides — use border
  • Forget that default style is none
  • Hard-code RTL overrides when one logical rule suffices

Key Takeaways

Knowledge Unlocked

Five things to remember about border-inline-end

Use these points when styling trailing inline borders.

5
Core concepts
02

Shorthand

Width style color.

Syntax
🌐03

RTL ready

Direction-aware.

Logical
📏04

One side

End edge only.

Scope
🛠05

vs border-right

Physical vs logical.

Compare

❓ Frequently Asked Questions

The border-inline-end property is a shorthand that sets the border on the inline-end side of an element — the side at the end of the text flow direction.
The initial value is medium none currentcolor, which means no visible border unless you set width, style, or color explicitly.
In horizontal left-to-right text, inline-end is usually the right side. In RTL, inline-end is usually the left side.
border-right always targets the physical right side. border-inline-end follows writing direction, so the same rule works in LTR and RTL layouts.
Use it when you need a border on the trailing inline side of content, such as a divider after text or an accent on the end edge in multilingual layouts.

Practice in the Live Editor

Open the HTML editor, try border-inline-end, and preview direction-aware trailing 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