The border-left-color
property sets the color of the left border.
Color values can be hex, rgb, hsl, rgba, hsla, or a color name.
A border-left-style value is required for a border to show.
An element with a colored left border.
<style>
.border-left-color {
padding: 10px;
border-left-style: solid;
border-left-color: #302ea3;
}
</style>
<div class="border-left-color">
indigo left border color
</div>
border-left-color: color | transparent | initial | inherit;
Value | Description |
---|---|
color | left border color. Accepts colorname, hex, rgb, rgba, hsl, hsla values. |
transparent | Sets left border color to transparent |
initial | Sets the value to its default value. |
inherit | Inherits the value from its parent element. |
Click the buttons to see the different border-left-color
values.
<style>
.border-left-example {
border-left-style: solid;
border-left-color: #302ea3;
padding: 10px;
}
</style>
<div class="border-left-example">
border-left-color: #302ea3
</div>
This table shows when border-left-color
support started for each browser.
Chrome
|
1.0 | Dec 2008 |
Firefox
|
1.0 | Nov 2004 |
IE/Edge
|
4.0 | Sep 1997 |
Opera
|
3.5 | Nov 1998 |
Safari
|
1.0 | Jun 2003 |