Language
日本語
English

Caution

JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.

CSS Dictionary

  1. Home
  2. CSS Dictionary
  3. border-right-color

border-right-color

Specifies the color of the right border.

Sample Code

style.css
/* Color name */
div.test { border-right-color: red;}

/* Hex color code */
div.test1 { border-right-color: #ff0;}

/* Transparent (border space exists but is invisible) */
div.test2 { border-right-color: transparent;}

/* rgb() function */
div.test3 { border-right-color: rgb(0, 119, 204);}

/* rgba() for semi-transparency */
div.test4 { border-right-color: rgba(0, 0, 0, 0.3);}

/* border-right-style must also be set to make it visible */
.right-accent {
	border-right-style: solid;
	border-right-width: 4px;
	border-right-color: #0077cc;
	padding-right: 16px;
}

Available Values

ValueDescription
transparentSets the border color to transparent.
Color code or color nameChanges the border to the specified color. If no value is set for 'border-right-color', the color specified by the 'color' property is used as the initial value.

Browser Preview

※ The 'border-style' property in the sample below is set to 'solid'.

<div style="border-right-color: red; border-style: solid; height: 100px; padding: 10px; font-weight: bold;">A div element with height 100px and padding 10px.</div>

Overview

Specifies the color of the right border.

If no value is set for 'border-right-color', the color specified by the 'color' property is used as the initial value.

Browser Compatibility

Chrome Chrome
1+
Firefox Firefox
1+
Safari Safari
1+
Edge Edge
12+
IE IE
11
10
9
8
7
6
Opera Opera
3.5+
2 and below ×
iOS Safari iOS Safari
1+
Android Android Browser
4.4+
3 and below ×
Chrome Android Chrome Android
Latest
Same support as desktop
Firefox Android Firefox Android
Latest
Same support as desktop

※ Version information is based on MDN.

If you find any errors or copyright issues, please .