CSS border-inline-end-width Property

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

What You’ll Learn

The border-inline-end-width property sets how thick the border is on the inline-end side only.

01

Inline-End

Trailing side width.

02

thin

About 1px.

03

medium

Default ~3px.

04

thick

About 5px.

05

Length

px, em, rem.

06

RTL Ready

Direction-aware.

Definition and Usage

The border-inline-end-width CSS property controls the thickness of the border on the inline-end side of an element. It is a longhand of border-inline-end and accepts the same width values as standard border width properties.

Unlike border-right-width, which always targets the physical right side, border-inline-end-width adapts to writing mode and text direction — useful for RTL layouts and multilingual interfaces.

💡
Beginner Tip

border-inline-end-width only sets thickness. Pair it with border-inline-end-style and border-inline-end-color, or use the border-inline-end shorthand.

📝 Syntax

border-inline-end-width accepts keyword or length values:

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

Basic Example

border-inline-end-width.css
p {
  border-inline-end-width: 5px;
  border-inline-end-style: solid;
  border-inline-end-color: black;
}

Syntax Rules

  • Accepts thin, medium, thick, or any length such as 2px or 0.25em.
  • Only affects the inline-end border side; other sides keep their own widths.
  • A visible border-inline-end-style is required for the width to show.
  • The physical side mapped to inline-end depends on direction and writing-mode.
  • Default is medium, typically about 3px in most browsers.

⚡ Quick Reference

QuestionAnswer
Initial valuemedium
Applies toInline-end border thickness
InheritedNo
AnimatableYes (as length)
Common useThick trailing dividers, accent end borders, RTL-safe layouts

Default Value

The default value of border-inline-end-width is medium, which browsers typically render as about 3px when a visible border style is applied.

💎 Property Values

ValueExampleMeaning
thinborder-inline-end-width: thin;Thin border, typically about 1px
mediumborder-inline-end-width: medium;Default thickness, typically about 3px
thickborder-inline-end-width: thick;Thick border, typically about 5px
Lengthborder-inline-end-width: 2px;Exact size in px, em, rem, etc.
initialborder-inline-end-width: initial;Resets to the default medium value
inheritborder-inline-end-width: inherit;Inherits from the parent element

Keyword Width Comparison

thin~1px
medium~3px default
thick~5px

Inline-End Width and Writing Modes

border-inline-end-width always applies to the end of the inline axis. The physical side changes with text direction.

LTR (direction: ltr)

5px inline-end (usually right)

RTL (direction: rtl)

5px inline-end (usually left)

border-inline-end-width vs related properties

PropertyTargetsBest for
border-inline-end-widthThickness on inline-end onlyThick trailing dividers in logical layouts
border-inline-endWidth, style, and color on inline-endSetting the full inline-end border in one rule
border-inline-end-styleLine style on inline-endsolid, dashed, or dotted patterns
border-right-widthPhysical right side thicknessFixed LTR-only layouts

👀 Live Preview

A box with a 4px blue inline-end border:

4px border on the inline-end side.

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

Examples Gallery

Try border-inline-end-width with pixel values, keywords, relative units, and RTL layouts.

📚 Basic End Border Widths

Control thickness on the trailing inline border side.

Example 1 — 5px Inline-End Border

Set a 5px width on inline-end with style and color longhands, matching the reference tutorial.

border-inline-end-width-5px.html
<style>
  p {
    border-inline-end-width: 5px;
    border-inline-end-style: solid;
    border-inline-end-color: black;
    padding: 0.75rem 1rem;
  }
</style>

<p>This paragraph has a border width of 5px on the inline-end side.</p>
Try It Yourself

How It Works

Three longhands work together: width sets thickness, style makes the line visible, and color sets the line color. In LTR, inline-end is often the right edge.

Example 2 — thin, medium, and thick Keywords

Use keyword widths for quick, browser-defined thickness on the inline-end side.

border-inline-end-width-keywords.css
.thin {
  border-inline-end: thin solid #2563eb;
}
.medium {
  border-inline-end: medium solid #2563eb;
}
.thick {
  border-inline-end: thick solid #2563eb;
}
Try It Yourself

How It Works

thin, medium, and thick are keyword widths. Browsers map them to approximate pixel sizes — useful when you want consistent relative thickness without exact px values.

🎨 Relative Units and RTL

Scale end borders with text size and direction.

Example 3 — em-Based Inline-End Width

Use em so the end border scales with the element’s font size.

border-inline-end-width-em.css
.quote {
  font-size: 1.25rem;
  border-inline-end-width: 0.25em;
  border-inline-end-style: solid;
  border-inline-end-color: #7c3aed;
  padding: 0.75rem 1rem;
  background: #faf5ff;
}
Try It Yourself

How It Works

0.25em is relative to the element’s font size. If the text grows, the end border grows proportionally — handy for responsive typography.

Example 4 — RTL with Thick End Border

A thick inline-end border adapts when text direction is right-to-left.

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

<div class="rtl-box">
  حد سمك نهائي عريض
</div>
Try It Yourself

How It Works

The 6px width still applies to inline-end. In RTL, that is usually the left side — no separate border-left-width rule is needed.

🧠 How border-inline-end-width Works

1

Width reserves space

border-inline-end-width sets how much room the border takes on the trailing side.

Width
2

Style makes it visible

A visible style such as solid or dashed is required to see the width.

Style
3

Direction maps the side

Inline-end maps to the correct physical side for LTR or RTL.

Mapping
=

Sized end border

Only the trailing inline edge shows your chosen border thickness.

Modern Browser Support

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

Baseline · Modern browsers

Logical inline-end widths in today’s browsers

Chrome, Edge, Firefox, Safari, and Opera support border-inline-end-width 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-width property 94% supported

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

Conclusion

The border-inline-end-width property controls how thick the trailing inline border is. Use it for accent dividers, thick end highlights, and layouts that stay correct in LTR and RTL writing modes.

Combine it with style and color longhands, or use the border-inline-end shorthand when you want all three values together.

💡 Best Practices

✅ Do

  • Set border-inline-end-style alongside width for visible borders
  • Use em or rem when the border should scale with text
  • Prefer logical end widths over border-right-width in RTL layouts
  • Test end border widths in both LTR and RTL
  • Use the shorthand when width, style, and color are all needed

❌ Don’t

  • Set width alone without a visible border style
  • Assume inline-end is always the physical right side
  • Mix conflicting physical and logical width rules on the same element
  • Rely on keyword widths when you need pixel-perfect design
  • Hard-code RTL overrides when one logical rule suffices

Key Takeaways

Knowledge Unlocked

Five things to remember about border-inline-end-width

Use these points when sizing trailing inline borders.

5
Core concepts
02

Default medium

~3px.

Default
🔀03

thin / thick

Keywords.

Values
🌐04

RTL ready

Direction-aware.

Logical
🛠05

Needs style

Width longhand.

Usage

❓ Frequently Asked Questions

The border-inline-end-width property sets how thick the border is on the inline-end side only — the trailing edge along the text flow direction.
The initial value is medium, which browsers typically render as about 3px when a visible border style is set.
In horizontal left-to-right text, inline-end is usually the right side. In RTL, inline-end is usually the left side.
Width alone does not draw a border. You also need a visible border-inline-end-style such as solid or dashed, and usually a color.
border-right-width always targets the physical right side. border-inline-end-width follows writing direction, so the same rule works in LTR and RTL layouts.

Practice in the Live Editor

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