The border-inline-width property sets how thick the border is on both inline sides — inline-start and inline-end.
01
Both Inline
Start and end width.
02
thin
About 1px.
03
medium
Default ~3px.
04
thick
About 5px.
05
Length
px, em, rem.
06
RTL Ready
Direction-aware.
Fundamentals
Definition and Usage
The border-inline-width CSS property controls the thickness of the border on both inline edges of an element. It is a longhand of border-inline and accepts the same width values as standard border width properties.
Unlike border-width, which sets thickness on all four sides, border-inline-width only affects the two inline edges and adapts to writing mode and text direction — useful for RTL layouts and multilingual interfaces.
💡
Beginner Tip
border-inline-width only sets thickness. Pair it with border-inline-style and border-inline-color, or use the border-inline shorthand. You can pass one value for both edges or two values for start and end separately.
Foundation
📝 Syntax
border-inline-width accepts keyword or length values — one value for both edges, or two for start and end:
The default value of border-inline-width is medium, which browsers typically render as about 3px when a visible border style is applied.
Reference
💎 Property Values
Value
Example
Meaning
thin
border-inline-width: thin;
Thin border, typically about 1px
medium
border-inline-width: medium;
Default thickness, typically about 3px
thick
border-inline-width: thick;
Thick border, typically about 5px
Length
border-inline-width: 2px;
Exact size in px, em, rem, etc.
initial
border-inline-width: initial;
Resets to the default medium value
inherit
border-inline-width: inherit;
Inherits from the parent element
Keyword Width Comparison
thin~1px
medium~3px default
thick~5px
Scope
Inline Width and Writing Modes
border-inline-width applies to both inline-start and inline-end. In horizontal writing modes, that usually means the left and right sides — regardless of text direction.
LTR (direction: ltr)
5px left and right inline edges
RTL (direction: rtl)
5px left and right inline edges
Compare
border-inline-width vs related properties
Property
Targets
Best for
border-inline-width
Thickness on both inline edges
Matching or asymmetric inline border sizes
border-inline-start-width
Thickness on inline-start only
Leading-edge accent bars in logical layouts
border-inline-end-width
Thickness on inline-end only
Trailing-edge dividers in logical layouts
border-inline
Width, style, and color on both inline edges
Setting the full inline border in one rule
border-width
Thickness on all four sides
Uniform frames around an element
Preview
👀 Live Preview
A box with 4px blue borders on both inline edges:
4px borders on the inline edges.
Uses border-inline: 4px solid #2563eb;.
Hands-On
Examples Gallery
Try border-inline-width with pixel values, keywords, asymmetric widths, and RTL layouts.
📚 Basic Inline Border Widths
Control thickness on both inline-start and inline-end.
Example 1 — 5px Inline Border
Set a 5px width on both inline edges with style and color longhands, matching the reference tutorial.
border-inline-width-5px.html
<style>.box{border-inline-width:5px;border-inline-style:solid;border-inline-color:black;padding:0.75rem 1rem;}</style><divclass="box">
This is a box with 5px inline borders.
</div>
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.
🎨 Two Values and RTL
Set different start/end widths and test direction-aware layouts.
Example 3 — Different Start and End Widths
Pass two values so inline-start and inline-end can have different thicknesses.
The first value sets inline-start width; the second sets inline-end. In LTR, that is usually 2px on the left and 8px on the right — without using physical border-left-width or border-right-width.
Example 4 — RTL with 5px Inline Borders
The same inline width applies to both edges in right-to-left layouts.
border-inline-width-rtl.html
<style>.rtl-box{direction:rtl;border-inline-width:5px;border-inline-style:solid;border-inline-color:#059669;padding:0.75rem 1rem;background:#ecfdf5;}</style><divclass="rtl-box">
حدود داخلية على جانبي النر
</div>
One 5px value sets both inline edges. In horizontal RTL, those are still the left and right sides — no separate physical width rules are needed.
🧠 How border-inline-width Works
1
Width reserves space
border-inline-width sets how much room the border takes on both inline edges.
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 edges
Inline-start and inline-end map to the correct physical sides for each writing mode.
Mapping
=
▪️
Sized inline borders
Both inline edges show your chosen border thickness.
Compatibility
Modern Browser Support
The border-inline-width property is supported in all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera.
✓ Baseline · Modern browsers
Logical inline widths in today’s browsers
Chrome, Edge, Firefox, Safari, and Opera support border-inline-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-width property94% supported
Bottom line: Use border-inline-width for direction-aware inline border thickness in modern multilingual projects.
Wrap Up
Conclusion
The border-inline-width property controls how thick the borders are on both inline edges. Use it for column dividers, paired accents, and layouts that stay correct in LTR and RTL writing modes.
Combine it with style and color longhands, or use the border-inline shorthand when you want all three values together.
Set border-inline-style alongside width for visible borders
Use two values when start and end need different thicknesses
Prefer logical inline widths over physical left/right rules in RTL layouts
Test inline 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 means only one physical 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
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about border-inline-width
Use these points when sizing both inline edges.
5
Core concepts
▪️01
Both inline edges
One or two values.
Purpose
⚡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-width property sets how thick the border is on both inline edges — inline-start and inline-end — using one or two width values.
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, it usually affects the left and right sides — both inline edges along the text flow.
Width alone does not draw a border. You also need a visible border-inline-style such as solid or dashed, and usually a color.
border-width sets thickness on all four sides. border-inline-width only affects the two inline edges and can use two values for start and end separately.