CSS border-right-style Property
The border-right-style property in CSS defines the style of the right border of an element. It works alongside border-right-width and border-right-color to fully control the right border appearance.
1. Syntax
Value Options:
| Value | Description |
|---|---|
none | No border (default). |
solid | A single, continuous border. |
dotted | A border consisting of dots. |
dashed | A border consisting of dashes. |
double | Two solid borders with a small gap between them. |
groove | A 3D grooved border. |
ridge | A 3D ridged border (opposite of groove). |
inset | A 3D border that makes the element appear embedded. |
outset | A 3D border that makes the element appear raised. |
hidden | Similar to none, but may still affect table layouts. |
2. Example – Setting border-right-style
✅ The right border will be solid, blue, and 5px wide.
3. Example – Using Different Border Styles
✅ Each element will have a different right border style.
4. Example – Removing the Right Border
✅ The right border will not be visible.
5. Best Practices
✔ Always combine border-right-style with border-right-width and border-right-color for a visible border.
✔ Use border-right shorthand to define all properties in one line:
✔ Use none instead of hidden unless working with table layouts.

