-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
94 lines (66 loc) · 2.08 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
title: border-right-color
slug: Web/CSS/border-right-color
page-type: css-property
browser-compat: css.properties.border-right-color
---
{{CSSRef}}
The **`border-right-color`** CSS property sets the color of an element's right [border](/en-US/docs/Web/CSS/border). It can also be set with the shorthand CSS properties {{cssxref("border-color")}} or {{cssxref("border-right")}}.
{{EmbedInteractiveExample("pages/css/border-right-color.html")}}
## Syntax
```css
/* <color> values */
border-right-color: red;
border-right-color: #ffbb00;
border-right-color: rgb(255 0 0);
border-right-color: hsl(100deg 50% 25% / 75%);
border-right-color: currentcolor;
border-right-color: transparent;
/* Global values */
border-right-color: inherit;
border-right-color: initial;
border-right-color: revert;
border-right-color: revert-layer;
border-right-color: unset;
```
The `border-right-color` property is specified as a single value.
### Values
- {{cssxref("<color>")}}
- : The color of the right border.
## Formal definition
{{CSSInfo}}
## Formal syntax
{{csssyntax}}
## Examples
### A simple div with a border
#### HTML
```html
<div class="mybox">
<p>
This is a box with a border around it. Note which side of the box is
<span class="redtext">red</span>.
</p>
</div>
```
#### CSS
```css
.mybox {
border: solid 0.3em gold;
border-right-color: red;
width: auto;
}
.redtext {
color: red;
}
```
#### Result
{{EmbedLiveSample('A_simple_div_with_a_border')}}
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- The border-related CSS shorthand properties: {{cssxref("border")}}, {{cssxref("border-right")}}, and {{cssxref("border-color")}}.
- The color-related CSS properties for the other borders: {{cssxref("border-left-color")}}, {{cssxref("border-bottom-color")}}, and {{cssxref("border-top-color")}}.
- The other border-related CSS properties applying to the same border: {{cssxref("border-right-style")}} and {{cssxref("border-right-width")}}.
- The default [`currentcolor`](/en-US/docs/Web/CSS/color_value#currentcolor_keyword) color value.