The border-right-style property defines the line style of the right border on an element. It is useful when you want the right edge styled differently from the other sides.
01
Right Style
Physical right edge.
02
solid
Continuous line.
03
dashed / dotted
Soft dividers.
04
3D Styles
groove, ridge, inset.
05
none Default
No border by default.
06
Longhand
Part of border-right.
Fundamentals
Definition and Usage
The border-right-style CSS property specifies the style of the right border of an element. This property allows you to control the appearance of the right edge, enhancing design and visual hierarchy on your web pages.
By choosing different border styles such as solid, dashed, or dotted, you can create a variety of effects for sidebar dividers, callouts, navigation accents, and right-edge highlights.
💡
Beginner Tip
A border only appears when border-right-style is not none. Pair it with border-right-width and border-right-color, or use border-right: 2px solid #000; as shorthand.
Foundation
📝 Syntax
The syntax for border-right-style is straightforward:
The style value refers to the border line type, such as solid, dashed, or dotted.
Syntax Rules
The initial value is none, which hides the right border.
Common values include solid, dashed, and dotted.
3D-style keywords include groove, ridge, inset, and outset.
Pair with width and color longhands, or use the border-right shorthand.
Related longhands: border-right-width and border-right-color.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
none
Applies to
Right border style only
Inherited
No
Animatable
No
Common use
Quote bars, right accents, callout dividers
Defaults
Default Value
The default value of border-right-style is none, meaning no right border is displayed until you choose a visible style.
Reference
💎 Property Values
The border-right-style property accepts standard CSS border style keywords.
Value
Description
none
No border is displayed
solid
A single solid line
dashed
A series of dashed lines
dotted
A series of dotted lines
double
Two solid lines with space between them
groove
A 3D grooved border that looks carved in
ridge
A 3D ridged border that looks raised out
inset
A 3D inset border that looks embedded
outset
A 3D outset border that looks raised
hidden
Same as none, but can still affect table layout
previewsolid
previewdotted
previewdashed
previewdouble
previewgroove
previewridge
previewinset
previewoutset
Scope
Right Border Style and Text Direction
border-right-style always styles the physical right side. Text direction does not move the border — compare with border-inline-end-style when building RTL layouts.
LTR (direction: ltr)
Dashed right border on the right side
leftright
RTL (direction: rtl)
Right border style still on the right side
leftright
Compare
border-right-style vs border-inline-end-style
Property
Targets
Best for
border-right-style
Physical right border style
Quote bars, right accents, and classic LTR layouts
border-inline-end-style
Logical inline-end border style (direction-aware)
Trailing edge accents that follow text direction in RTL
border-right
Width, style, and color on the right side
Setting the full right border in one rule
Preview
👀 Live Preview
A box with a solid blue right border style:
This element has a solid right border style.
Uses border-right-style: solid; with width and color longhands.
Hands-On
Examples Gallery
Try border-right-style with solid, dashed, dotted, and double right borders.
📚 Basic Right Border Styles
Set the right border style with width and color longhands so the line is visible.
Example 1 — Solid Right Border
Set the right border style to solid with width and color, matching the reference tutorial.
border-right-style-solid.html
<style>.box{border-right-style:solid;border-width:5px;border-color:#3498db;padding:20px;width:200px;}</style><divclass="box">
This box has a solid right border.
</div>
dashed breaks the right border into short segments, which works well for subtle callout accents.
Example 4 — border-right-style in RTL
In RTL text, border-right-style stays on the physical right — unlike border-inline-end-style.
border-right-style-rtl.html
<style>.rtl-box{direction:rtl;border-right-style:solid;border-right-width:4px;border-right-color:#059669;padding:0.75rem 1rem;background:#ecfdf5;}</style><divclass="rtl-box">
حد فيزيكي على اليسار
</div>
RTL changes text flow but not the physical right edge. For a trailing accent in RTL, use border-inline-end-style instead.
🧠 How border-right-style Works
1
You choose a line style
Set solid, dashed, dotted, or another border style keyword.
Style rule
2
You add width and color
Pair the style with border-right-width and border-right-color.
Border setup
3
The browser draws the right edge
Only the physical right border uses that line style. Top, left, and bottom sides stay unchanged.
Right edge
=
⋯
Styled right accent
Your element gets a clear visual separator on the physical right edge.
Compatibility
Universal Browser Support
The border-right-style property is supported in all major browsers, including Chrome, Firefox, Safari, Edge, Opera, and Internet Explorer. It is one of the most reliable CSS border properties.
✓ Baseline · All browsers
Reliable right border styles on every platform
Chrome, Firefox, Safari, Edge, and Opera all support border-right-style consistently.
100%Universal support
Google Chrome69+ · Desktop & Mobile
Full support
Mozilla Firefox66+ · Desktop & Mobile
Full support
Apple Safari12.1+ · macOS & iOS
Full support
Microsoft Edge79+ · Chromium
Full support
Opera56+ · Modern versions
Full support
border-right-style property100% supported
Bottom line: Use border-right-style freely in any project. It works consistently across all browsers.
Wrap Up
Conclusion
The border-right-style property provides a variety of options for styling the right border of an element, from simple lines to more complex effects like double and 3D styles.
By experimenting with different style keywords, you can enhance the visual appeal and user experience of your website with sidebar dividers, callouts, and decorative right accents.
Use solid for clear sidebar dividers and right-edge accents
Try dashed or dotted for softer callout dividers
Use border-inline-end-style when the accent must follow text direction in RTL
Pair style with width and color longhands for predictable results
Use the border-right shorthand when setting all three parts
Give double enough width (usually 3px or more) to show two lines
❌ Don’t
Leave the value at none and expect a visible border
Expect border-right-style to move to the left in RTL layouts
Use heavy 3D styles everywhere in modern flat UI
Mix physical and logical style properties without a clear reason
Forget width when using thin styles like dotted or dashed
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about border-right-style
Use these points when styling the physical right edge.
5
Core concepts
⋯01
Right Style
Physical right edge.
Purpose
—02
none Default
Hidden by default.
Default
📝03
solid / dashed
Most common styles.
Values
⚙️04
Needs Width
Pair with longhands.
Setup
🔄05
One Edge Only
Other sides unchanged.
Scope
❓ Frequently Asked Questions
The border-right-style property sets the line style of the border on the physical right side of an element only.
The initial value is none, which means no right border is displayed until you set a visible style such as solid or dashed.
If the value is none, no border appears. You also need border-right-width greater than zero and usually a color, or use the border-right shorthand.
border-right-style always styles the physical right edge. border-inline-end-style follows writing direction, so it moves to the left in RTL layouts.
solid, dashed, and dotted are the most common for sidebar dividers and right accents. double, groove, ridge, inset, and outset create stronger visual effects.