border-left-color
Specifies the color of the left border.
Sample Code
style.css
/* Color name */
div.test { border-left-color: red;}
/* Hex color code */
div.test1 { border-left-color: #ff0;}
/* Transparent (border space exists but is invisible) */
div.test2 { border-left-color: transparent;}
/* rgb() function */
div.test3 { border-left-color: rgb(0, 119, 204);}
/* rgba() for semi-transparency */
div.test4 { border-left-color: rgba(0, 0, 0, 0.3);}
/* Practical example: blockquote accent bar */
.blockquote-style {
border-left-style: solid;
border-left-width: 4px;
border-left-color: #0077cc;
padding-left: 16px;
}
Available Values
| Value | Description |
|---|---|
| transparent | Sets the border to transparent. |
| Color code or color name | Changes the border to the specified color. If no『border-left-color』value is set, the color of the『color』property is used as the default. |
Browser Preview
※ The sample below uses『border-style: solid』.
<div style="border-left-color: red; border-style: solid; height: 100px; padding: 10px; font-weight: bold;">A div element with height 100px and padding 10px.</div>
Notes
Specifies the color of the left border.
If no value is set for『border-left-color』, the color of the『color』property is used as the default.
Browser Compatibility
Desktop
8 ○
7 ○
6 ○
2 and below ×Mobile
Android Browser
4.4+ ○
3 and below ×Same support as desktop version
Same support as desktop version
※ Version information is based on MDN.
If you find any errors or copyright issues, please contact us.