CSS border-inline-width Property

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

Definition and Usage

The border-inline-width property sets the thickness of both logical inline borders — inline-start and inline-end. It maps to physical edges based on writing-mode, direction, and text-orientation.

In horizontal left-to-right text, those edges are usually left and right, so one declaration covers what border-left-width and border-right-width would do. Use one value for both sides, or two values for start then end. It applies to all elements and is not inherited. Each side starts as medium.

Standard-track.

Not deprecated and not experimental. Logical inline border widths have been widely available since 2021.

CSS Syntax

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

One value sizes both inline edges. Two values set border-inline-start-width then border-inline-end-width. Values match <line-width>.

Property Values

ValueDescriptionTry it
<length>An explicit non-negative size such as 5px on both edgesTry it
thinA thin line on both edges. Often about 1pxTry it
mediumDefault thickness on each side. Often about 3pxTry it
thickA thick line on both edges. Often about 5pxTry it
5px 12pxTwo values: start 5px, end 12pxTry it
initialResets both sides to mediumTry it
inheritInherits this property from the parent elementTry it

Negative lengths are invalid. Keyword sizes are not fixed pixels; they can vary slightly by browser.

How to Use border-inline-width

Pick a thickness for the inline edges, then give those lines a visible style and color.

  1. Set border-inline-width to a length or keyword such as 5px or thick, or two values such as 5px 12px.
  2. Set border-inline-style to a visible value such as solid.
  3. Set border-inline-color so the lines contrast with the background.
  4. Or use the border-inline shorthand for width, style, and color in one line.
PieceRequired?Role
A widthYesControls how thick both inline edges are
A styleTo see itnone hides the lines even when width is set
A colorTo see it clearlyLow contrast makes the edges look missing

Live Preview

The box keeps the same style and color. Only border-inline-width changes.

In horizontal LTR writing, inline edges are usually left and right.

Result

Inline edges

border-inline-width: 5px

CSS Examples

Each snippet shows only what you need for the inline widths: a size, a style, and a color. Use Try It Yourself for a live editor.

Example 1 — Pixel Length

Set a clear 5px thickness on both inline edges. In LTR, that is left and right.

CSS
<style>
  p {
    border-inline-width: 5px;
    border-inline-style: solid;
    border-inline-color: blue;
  }
</style>

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

How It Works

  1. Choose the thickness. border-inline-width: 5px sets the same size on both inline sides.
  2. Draw the lines. border-inline-style: solid makes both edges visible.
  3. Color them. border-inline-color: blue sets the ink of those edges.
  4. Read both edges. With default LTR writing, you get matching left and right borders from one declaration.

Example 2 — Two Different Widths

Use two values to size inline-start and inline-end differently.

CSS
<style>
  p {
    border-inline-width: 5px 12px;
    border-inline-style: solid;
    border-inline-color: blue;
  }
</style>

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

How It Works

  1. First value is start. 5px sizes the inline-start edge.
  2. Second value is end. 12px sizes the inline-end edge.
  3. Keep style and color shared. Both sides still use the same style and color here.
  4. Same idea as longhands. This matches setting border-inline-start-width and border-inline-end-width separately.

Example 3 — Vertical Writing Mode

The widths stay on the logical inline edges when the writing mode flips.

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

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

How It Works

  1. Flip the writing mode. writing-mode: vertical-rl makes lines run vertically.
  2. Keep the logical width. The same border-inline-width: 5px still targets both inline edges.
  3. Watch the physical sides move. The thick lines are no longer stuck to left and right of the screen box.
  4. Why logical properties exist. One width declaration can follow writing mode instead of rewriting left and right borders.

Edge Cases & Pitfalls

If both edges look missing, the style, color, or physical vs logical mix is usually why.

style

Width alone draws nothing

Without a visible border-inline-style, thickness has no lines to size. Set solid (or another style) too.

left

Not the same as left and right alone

border-left-width always hits the physical left. This property follows the inline axis when writing-mode or direction changes.

short

The shorthand can overwrite the width

border-inline sets width, style, and color together. Writing it after border-inline-width replaces that thickness.

2vals

Order is start, then end

With two values, the first is inline-start and the second is inline-end. Mixing them up flips which edge gets which size.

zero

0 removes both edges

A width of 0 is valid and hides the borders even if style and color are set. Use that on purpose, not by accident.

Browser Support

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

✓ Baseline · Widely available since 2021

border-inline-width

Chrome 87+, Firefox 66+, Safari 14.1+, Edge 87+. Internet Explorer has no support.

97% modern browsers
Google Chrome 87+
Full support
Mozilla Firefox 66+
Full support
Apple Safari 14.1+
Full support
Microsoft Edge 87+
Full support
Opera 73+
Full support
Samsung Internet 14.0+
Full support
Internet Explorer No support
None
border-inline-width Widely supported

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

Key Takeaways

  • Role: the thickness of both logical inline borders.
  • medium: the initial value on each side. Pair it with a visible style and color.
  • One or two values: one sizes both sides; two set start then end.
  • Pair it: add style and color, or use border-inline.

One line: border-inline-width chooses how thick both inline edges are; writing direction chooses which physical sides those are.

Frequently Asked Questions

It sets the thickness of both logical inline borders — inline-start and inline-end. In horizontal left-to-right text, that is usually the left and right edges.
Each side starts as medium. Browsers typically render medium as about 3px when a visible border style is set.
Yes. One value sets both sides. Two values set inline-start first, then inline-end — for example 5px 12px.
Width alone does not draw a border. You also need a visible border-inline-style such as solid, and a color that contrasts with the background.
border-left-width always targets the physical left edge. border-inline-width sets both inline edges and follows writing-mode and direction.
Chrome 87+, Firefox 66+, Safari 14.1+, and Edge 87+ support it. Internet Explorer does not. It is a browser layout property, not a Node.js feature.

Next: border-left

Set width, style, and color on the physical left border.

border-left 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