CSS Reference Property

border-right-color 5f124c

The border-right-color property is used to set the color of the right border of an element. 336j4s

Official Syntax 3xs5l

  • Syntax:

    border-right-color: <color>
  • Initial: currentColor
  • Applies To: all elements
  • Animatable: yes, as a <color>

Values u704t

<color>
See the <color> property entry for a list of possible values.

Notes 441w3q

The border-right-color property can also inherit the value of the element’s parent’s right border color using the keyword inherit.

Examples 2h2053

The following are all valid border-right-color values set on an element. The element’s border style and border width are also set using the border-right-width respectively.

.element {
    border-right-style: dotted;
    border-right-width: 10px;

    border-right-color: red;
    /* or */
    border-right-color: #44aacf;
    /* or */
    border-right-color: rgba(255,0,10,.5);
}
                

Live Demo 6b4m17

Have a look at the live demo

View this demo on the Codrops Playground

Browser 572e63

The property works in all major browsers: Chrome, Firefox, Safari, Opera, IE, and on Android and iOS.

Written by

Last updated June 4, 2020 at 2:46 pm by Mary Lou

Do you have a suggestion, question or want to contribute? Submit an issue.