CSS border-right-style Property
Description
The border-right-style property specifies the visual pattern used to draw the right edge of an element’s border box. It governs whether the right border is painted and, if painted, what kind of line or pattern is rendered along that edge. Because it targets only the right side, it’s commonly used when you want asymmetric borders - for example, to emphasize a seam or divider between adjacent content without drawing a full rectangle around an element.
The final appearance of the right edge is the result of combining border-right-width, border-right-color, and border-right-style. If the width is zero or the style is one that suppresses painting, nothing will be visible regardless of color. Likewise, using the shorthand border-right allows you to set width, color, and style together for convenience; the per-side style here takes precedence for the right edge when both shorthand and longhand are applied.
You can also influence multiple sides at once using the shorthand border-style, which sets styles for all four edges; individual per-side declarations (like the right-side property) override these broader settings. From a layout and painting perspective, borders become part of the element’s box and can affect hit testing, visual stacking, and the perceived separation between elements. Borders are drawn outside the element’s padding and inside the margin area, so changing the right-side style can change the visual rhythm of inline and block layouts without altering content flow.
In the cascade, border-right-style behaves like other non-inherited box properties: it is applied according to origin, specificity, and source order, and can be reset or overridden by shorthands. Because style changes may be discrete (switching from one visual pattern to another), animating this property is not the same as animating numeric values; transitions may result in abrupt swaps rather than smooth interpolations. Use it alongside the matching width and color properties when you need precise control over the right-edge treatment of an element.
Definition
- Initial value
- none
- Applies to
- All elements
- Inherited
- No
- Computed value
- Specified value
- Animatable
- No
- JavaScript syntax
- object.style.borderRightStyle
Interactive Demo
Syntax
border-right-style: <line-style>
Values
- noneBorder is not drawn, color and width are ignored. If the border is an image, the image layer counts but is not drawn.
- hiddenSame as none, except in terms of conflict resolution of collapsed borders. Any element with a hidden border suppresses all shared borders at that location. Borders with a style of none have the lowest priority.
- dottedA series of round dots.
- dashedA series of square-ended dashes.
- solidA single line segment.
- doubleTwo parallel solid lines with some space between them.
- grooveDisplays a border leading to a carved effect. It is the opposite of ridge.
- ridgeLooks as if it were coming out of the canvas.
- insetLooks as if the content on the inside of the border is sunken into the canvas.
- outsetLooks as if the content on the inside of the border is coming out of the canvas.
- inherit
Example
Browser Support
The following information will show you the current browser support for the CSS border-right-style property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
