CSS border-left-color Property
Description
The border-left-color
CSS property is used to specify the color of the left border of an element, such as a div or a paragraph. By setting a value for this property, you can define the visual appearance of the left border, allowing for customization and differentiation of borders within your web page design. This property is part of the broader set of CSS border properties, which also include border-width and border-style, enabling precise control over the borders of elements in your HTML document.
- Initial value
- currentColor
- Applies to
- All elements
- Inherited
- No
- Computed value
- The computed color
- Animatable
- Yes
- JavaScript syntax
- object.style.borderLeftColor
Interactive Demo
Syntax
border-left-color: <color>
Values
- <color>The computed value of the 'color' property. This value can be a basic color keyword, such as red or green, a numerical value, an RGB or RGBA value, or an HSL or HSLA value.
- transparentFully transparent. This keyword can be considered a shorthand for transparent black, rgba(0,0,0,0), which is its computed value.
- inherit
Example
<div class="border">This is an example of the border-left-color property using a red solid border 3px in width.</div>
.border {
border: 1px solid blue;
border-left-style: solid;
border-left-width: 3px;
border-left-color: red;
margin: 20px;
padding: 20px;
}
Browser Support
The following table will show you the current browser support for the CSS border-left-color
property.
Desktop | |||||
![]() |
![]() |
![]() |
![]() |
![]() |
|
12 | 1 | 1 | 3.5 | 1 |
Tablets / Mobile | |||||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
18 | 4 | 10.1 | 1 | 1 | 4.4 |
Last updated by CSSPortal on: 31st December 2023