CSS border-right-color Property


The CSS property border-right-color is used to define the color of the right border of an element, such as a div or a paragraph, in a web page. This property is part of the broader border property set, which allows you to control the appearance of an element's borders. By specifying a color value, you can customize the right border's color independently of the other borders (top, bottom, and left). This property is useful for creating visually appealing and distinct border styles for different sides of an element, helping to enhance the overall design and layout of a webpage.

Initial value
Applies to
All elements
Computed value
The computed color
JavaScript syntax

Interactive Demo

The rusty swing set creaked a lonely lullaby in the twilight, shadows lengthening like grasping fingers across the dew-kissed grass. A lone dandelion seed, adrift on the breeze, whispered secrets of faraway fields, of dandelion suns and galaxies spun from fluff. Somewhere, beyond the veil of dusk, a coyote laughed, echoing through the stillness like a forgotten memory.


border-right-color: <color> 


  • <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


<div class="border">This is an example of the border-right-color property using a red solid border 3px in width.</div>
.border {
   border: 1px solid blue;
   border-right-style: solid;
   border-right-width: 3px;
   border-right-color: red;
   margin: 20px;
   padding: 20px;

Browser Support

The following table will show you the current browser support for the CSS border-right-color property.

Edge Chrome Firefox Opera Safari
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview

Last updated by CSSPortal on: 31st December 2023