CSS border-inline-style Property

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

What You’ll Learn

The border-inline-style property sets the line style on both inline sides — inline-start and inline-end.

01

Both Inline

Start and end sides.

02

solid

Single line.

03

dashed

Broken line.

04

dotted

Round dots.

05

Longhand

Style only.

06

RTL Ready

Direction-aware.

Definition and Usage

The border-inline-style CSS property controls how the border line is drawn on both inline edges of an element — inline-start and inline-end. It is a longhand of border-inline and accepts the same style keywords as standard border properties.

Unlike border-style, which sets styles on all four sides at once, border-inline-style 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-style only sets the line style. Pair it with border-inline-width and border-inline-color, or use the border-inline shorthand.

📝 Syntax

border-inline-style accepts standard border style keywords:

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

Basic Example

border-inline-style.css
div {
  border-inline-style: solid;
  border-inline-width: 4px;
  border-inline-color: blue;
}

Syntax Rules

  • Accepts none, solid, dashed, dotted, double, and 3D styles.
  • Only affects the two inline border edges; block sides keep their own styles.
  • You need a width greater than zero for the style to be visible.
  • In horizontal writing modes, inline edges are usually the left and right sides.
  • Default is none, which draws no border on the inline edges.

⚡ Quick Reference

QuestionAnswer
Initial valuenone
Applies toBoth inline edges (start and end)
InheritedNo
AnimatableNo
Common useColumn dividers, paired inline accents, RTL-safe borders

Default Value

The default value of border-inline-style is none. No inline border is drawn until you set a visible style such as solid or dashed.

💎 Property Values

ValueExampleMeaning
noneborder-inline-style: none;No border on inline edges
solidborder-inline-style: solid;Single continuous line
dashedborder-inline-style: dashed;Series of dashes
dottedborder-inline-style: dotted;Series of dots
doubleborder-inline-style: double;Two parallel solid lines
3D stylesgroove, ridge, inset, outsetThree-dimensional border effects

Common Style Types

solidcontinuous line
dasheddash pattern
dotteddot pattern

Inline Style and Writing Modes

border-inline-style applies the same style 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)

Dashed left and right inline edges

RTL (direction: rtl)

Dashed left and right inline edges

border-inline-style vs related properties

PropertyTargetsBest for
border-inline-styleLine style on both inline edgesMatching dashed or dotted styles on start and end
border-inline-start-styleLine style on inline-start onlyLeading-edge accents that follow text direction
border-inline-end-styleLine style on inline-end onlyTrailing-edge dividers that follow text direction
border-inlineWidth, style, and color on both inline edgesSetting the full inline border in one rule
border-styleStyle on all four sidesUniform frames around an element

👀 Live Preview

A box with dashed blue borders on both inline edges:

Dashed borders on the inline edges.

Uses border-inline: 3px dashed #2563eb;.

Examples Gallery

Try border-inline-style with solid, mixed styles, dotted, and RTL layouts.

📚 Basic Inline Border Styles

Style both inline-start and inline-end with one property.

Example 1 — Solid Inline Border

Apply a solid style on both inline edges with width and color longhands, matching the reference tutorial.

border-inline-style-solid.html
<style>
  div {
    border-inline-style: solid;
    border-inline-width: 4px;
    border-inline-color: blue;
    padding: 0.75rem 1rem;
  }
</style>

<div>This div has a solid blue border on the inline edges.</div>
Try It Yourself

How It Works

Three longhands work together: style draws a solid line, width sets thickness, and color sets the line color. Both inline edges share the same style.

Example 2 — Solid Frame with Dashed Inline Edges

Keep solid borders on block sides but override both inline edges to dashed.

border-inline-style-mixed.css
.card {
  border: 2px solid #cbd5e1;
  border-inline-style: dashed;
  border-inline-color: #2563eb;
  padding: 1rem;
  background: #eff6ff;
}
Try It Yourself

How It Works

The shorthand sets solid borders on all sides first. border-inline-style: dashed overrides both inline edges.

🎨 Dotted and RTL

Lightweight inline dividers and direction-aware layouts.

Example 3 — Dotted Inline Border

Use a dotted style for subtle separators on both inline edges.

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

How It Works

The shorthand 3px dotted #7c3aed sets width, style, and color on both inline edges in one declaration.

Example 4 — RTL with Dashed Inline Borders

The same dashed inline style works in right-to-left layouts without extra overrides.

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

<div class="rtl-box">
  سدود منقطة على جانبي النر
</div>
Try It Yourself

How It Works

Dashed still applies to both inline edges. In horizontal RTL, those are still the left and right sides — no separate physical border rules are needed.

🧠 How border-inline-style Works

1

Width reserves space

A border width on both inline edges creates room for the line.

Width
2

Style chooses the pattern

border-inline-style picks solid, dashed, dotted, or other patterns.

Style
3

Direction maps the edges

Inline-start and inline-end map to the correct physical sides for each writing mode.

Mapping
=

Styled inline borders

Both inline edges show your chosen line style.

Modern Browser Support

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

Baseline · Modern browsers

Logical inline styles in today’s browsers

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

Bottom line: Use border-inline-style for direction-aware inline border styles in modern multilingual projects.

Conclusion

The border-inline-style property controls how the border line is drawn on both inline edges. Use it for dashed dividers, dotted accents, and paired inline effects that stay correct in LTR and RTL layouts.

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

💡 Best Practices

✅ Do

  • Set border-inline-width alongside style for visible borders
  • Use dashed or dotted styles for lightweight inline dividers
  • Prefer logical inline styles over physical left/right rules in RTL layouts
  • Test inline border styles in both LTR and RTL
  • Use the shorthand when width, style, and color are all needed

❌ Don’t

  • Set style alone without a border width greater than zero
  • Assume inline means only one physical side
  • Mix conflicting physical and logical style rules on the same element
  • Use 3D styles unless they fit your design system
  • Hard-code RTL overrides when one logical rule suffices

Key Takeaways

Knowledge Unlocked

Five things to remember about border-inline-style

Use these points when styling both inline edges.

5
Core concepts
02

Default none

No border.

Default
🔀03

dashed

Common choice.

Values
🌐04

RTL ready

Direction-aware.

Logical
🛠05

Needs width

Style longhand.

Usage

❓ Frequently Asked Questions

The border-inline-style property sets the line style on both inline sides — inline-start and inline-end — using values such as solid, dashed, or dotted.
The initial value is none, which means no inline border is drawn unless you set a visible style.
In horizontal left-to-right text, it usually affects the left and right sides — both inline edges along the text flow.
border-inline-style only sets how the line is drawn. You also need border-inline-width greater than zero and usually a color.
border-style sets styles on all four sides. border-inline-style only affects the two inline edges and adapts to writing direction.

Practice in the Live Editor

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