CSS border-inline-end Property

Beginner
6 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The border-inline-end property is a shorthand for the logical inline-end border. It sets border-inline-end-width, border-inline-end-style, and border-inline-end-color in one place.

Which physical edge that is depends on writing-mode, direction, and text-orientation. In default horizontal LTR text it acts like border-right. In RTL it usually maps to the left. It applies to all elements and is not inherited.

Standard-track.

Not deprecated and not experimental. Logical border shorthands have been widely available since 2020.

CSS Syntax

syntax.css
border-inline-end: <line-width> || <line-style> || <color> | initial | inherit;

You can list width, style, and color in any order. Omit a piece to keep its initial value. The initial style is none, so a style keyword is required to see a line.

Property Values

ValueDescriptionTry it
<line-width>Thickness: a length, or thin, medium, thick. Default mediumTry it
solidA continuous line on the inline-end edgeTry it
dashedA dashed lineTry it
dottedA dotted lineTry it
doubleTwo parallel lines. Needs enough width to show bothTry it
noneNo border. Initial style. Width and color alone will not showTry it
<color>Border color. Default is currentColorTry it
initialResets to the initial values (style none)Try it
inheritInherits this property from the parent elementTry it

hidden, groove, ridge, inset, and outset are also valid styles. You can combine width, style, and color in any order, for example 4px solid blue.

How to Use border-inline-end

Pick a visible style, then set width and color. Prefer this over border-right when the layout must flip with text direction.

  1. Choose the element that needs a trailing inline edge (divider after text, accent after a card, and so on).
  2. Set border-inline-end with at least a style, such as 4px solid blue.
  3. Check LTR and RTL (or your writing mode). The border should stay on the inline-end side.
  4. Use the longhands only when you need to change width, style, or color alone later.
PieceRequired?Role
StyleYes (to show a line)Without it, the border stays none and invisible
WidthOptionalDefaults to medium if omitted
ColorOptionalDefaults to currentColor if omitted
Writing directionContextDecides whether inline-end is left, right, top, or bottom

Live Preview

In default LTR text the border sits on the right. Change the shorthand and watch only the inline-end edge update.

Horizontal LTR: inline-end is usually the right edge.

Result

Inline end

border-inline-end: 4px solid

CSS Examples

Each snippet keeps only what border-inline-end needs. Use Try It Yourself for a live editor.

Example 1 — Solid Inline-End Border

Draw a solid border on the inline-end edge. In horizontal LTR, that is the right side.

CSS
<style>
  p {
    border-inline-end: 4px solid blue;
  }
</style>

<p>Inline end</p>
Try It Yourself

How It Works

  1. One shorthand. border-inline-end: 4px solid blue sets width, style, and color together.
  2. Style makes it visible. Without solid (or another line style), the initial none draws nothing.
  3. Read the edge. In default horizontal LTR writing, inline-end is the right side of the paragraph.
  4. Same idea for dashed. Change only the style keyword if you want a softer divider.

Example 2 — RTL Flips the Physical Side

The same logical border moves to the left when the direction is right-to-left.

CSS
<style>
  p {
    direction: rtl;
    border-inline-end: 4px solid blue;
  }
</style>

<p>Inline end</p>
Try It Yourself

How It Works

  1. Flip the inline axis. direction: rtl makes the text flow right to left.
  2. Keep the logical border. The same border-inline-end rule still targets the end of that flow.
  3. Watch the physical side move. The line appears on the left, not the right.
  4. Why not border-right? A physical right border would stay on the right in RTL. Logical borders stay on the trailing edge of the text.

Example 3 — Vertical Writing Mode

With vertical text, inline-end is no longer a left or right edge of the screen box.

CSS
<style>
  p {
    writing-mode: vertical-rl;
    border-inline-end: 4px solid blue;
  }
</style>

<p>Inline end</p>
Try It Yourself

How It Works

  1. Change the writing mode. writing-mode: vertical-rl runs lines vertically.
  2. Keep the logical shorthand. border-inline-end still means β€œend of the inline axis.”
  3. The physical edge moves. The border is no longer locked to the right side of a horizontal box.
  4. One rule, many layouts. You do not rewrite border-right into border-bottom when the writing mode changes.

Edge Cases & Pitfalls

If the border is missing or on the wrong side, check style and writing direction first.

none

Style defaults to invisible

The initial style is none. Setting only a width or color does not draw a line. Include solid, dashed, or another visible style.

right

Not the same as border-right

border-right always hits the physical right. This property follows direction and writing-mode.

start

Start and end are opposite edges

border-inline-start is the leading inline edge. border-inline-end is the trailing one. Mixing them up places the accent on the wrong side.

short

The shorthand resets all three longhands

Writing border-inline-end after a longhand replaces width, style, and color together. Put longhands after the shorthand when you need a partial override.

contrast

Thin lines need clear color

A 1px border in a color close to the background is easy to miss. Use enough width and contrast when you are teaching or debugging.

Browser Support

border-inline-end is a browser layout property. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Widely available since 2020

border-inline-end

Chrome 69+, Firefox 41+, Safari 12.1+, Edge 79+. Internet Explorer has no support.

97% modern browsers
Google Chrome 69+
Full support
Mozilla Firefox 41+
Full support
Apple Safari 12.1+
Full support
Microsoft Edge 79+
Full support
Opera 56+
Full support
Samsung Internet 10.1+
Full support
Internet Explorer No support
None
border-inline-end Widely supported

Bottom line: Safe for modern browsers. For Internet Explorer, use a physical fallback such as border-right when you only need horizontal LTR layouts.

Key Takeaways

  • Role: shorthand for the logical inline-end border width, style, and color.
  • Style first: initial style is none. Include a visible line style to see the edge.
  • Logical: follows writing direction. Not locked to the physical right.
  • Pair: use with border-inline-start for both inline edges, or longhands for one part.

One line: border-inline-end paints the trailing inline edge; writing mode and direction choose which physical side that is.

Frequently Asked Questions

It is a shorthand that sets the width, style, and color of the logical inline-end border. That edge sits at the end of the text flow, not on a fixed physical side.
In horizontal left-to-right text it is usually the right side. In RTL it is usually the left. With a vertical writing mode it can map to the top or bottom instead.
border-right always paints the physical right edge. border-inline-end follows writing-mode, direction, and text-orientation, so one rule can stay correct in LTR and RTL layouts.
The initial style is none. You need a visible style such as solid or dashed. Width and color alone do not draw a line.
It sets border-inline-end-width, border-inline-end-style, and border-inline-end-color in one declaration.
Chrome 69+, Firefox 41+, Safari 12.1+, and Edge 79+ support it. Internet Explorer does not. It is a browser layout property, not a Node.js feature.

Next: border-inline-end-color

Set only the color of the logical inline-end border.

border-inline-end-color tutorial →

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.

8 people found this page helpful