CSS border-right-color Property
Description
The border-right-color property sets the color used when the right edge of an element’s border is rendered. It only affects that single side and does not directly change thickness, style, or how the border is positioned - it simply determines the paint used for the right border when the border is actually drawn. Visually, this is the color you see along the element’s right perimeter where the border exists.
How that color appears depends on whether the border on that side is being rendered at all and how other border properties are configured. The right-edge color interacts with the element’s border rendering rules controlled by border-style and its thickness from border-width; if the computed border style for the right edge results in no visible edge, the color has no effect. Authors often use the shorthand border-right or the grouped border-color to set this property alongside related attributes in a single declaration, and those shorthands participate in the cascade and override rules in the same way as the longhand property.
In the cascade and computed-value process, border-right-color follows normal CSS precedence (origin, specificity, source order) and is not an inherited property; a descendant will not automatically take its ancestor’s right border color unless explicitly specified. When the color includes partial transparency, the final rendered appearance depends on compositing with backgrounds and neighboring elements, and joins at corners with adjacent borders are resolved according to the border rendering model so you may see blending or seams at corners.
For internationalized layouts and writing-mode–sensitive designs, consider the logical equivalent that maps to the physical right side in different writing directions: border-inline-end-color. Using logical properties can make color application more robust across horizontal and vertical text flows, but under the hood the browser still computes a concrete color for the physical right edge when painting the element.
Definition
- Initial value
- currentColor
- Applies to
- All elements
- Inherited
- No
- Computed value
- The computed color
- Animatable
- Yes
- JavaScript syntax
- object.style.borderRightColor
Interactive Demo
Syntax
border-right-color: <color>
Values
- <color>The computed value of the 'color' property. This value can be a basic color keyword, such as red or green, a numerical value, an RGB or RGBA value, or an HSL or HSLA value.
- transparentFully transparent. This keyword can be considered a shorthand for transparent black, rgba(0,0,0,0), which is its computed value.
- inherit
Example
Browser Support
The following information will show you the current browser support for the CSS border-right-color 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
