--- title: border-left-color slug: Web/CSS/border-left-color translation_of: Web/CSS/border-left-color ---
The border-left-color CSS property sets the color of an element's left border. It can also be set with the shorthand CSS properties {{cssxref("border-color")}} or {{cssxref("border-left")}}.
/* <color> values */ border-left-color: red; border-left-color: #ffbb00; border-left-color: rgb(255, 0, 0); border-left-color: hsla(100%, 50%, 25%, 0.75); border-left-color: currentcolor; border-left-color: transparent; /* Global values */ border-left-color: inherit; border-left-color: initial; border-left-color: unset;
The border-left-color property is specified as a single value.
<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>
.mybox {
border: solid 0.3em gold;
border-left-color: red;
width: auto;
}
.redtext {
color: red;
}
{{EmbedLiveSample('A_simple_div_with_a_border')}}
| Specification | Status | Comment |
|---|---|---|
| {{SpecName('CSS3 Backgrounds', '#propdef-border-left-color', 'border-left-color')}} | {{Spec2('CSS3 Backgrounds')}} | No significant changes, though the transparent keyword, now included in {{cssxref("<color>")}} which has been extended, has been formally removed. |
| {{SpecName('CSS2.1', 'box.html#propdef-border-left-color', 'border-left-color')}} | {{Spec2('CSS2.1')}} | Initial definition |
{{cssinfo}}
{{Compat("css.properties.border-left-color")}}