CSS border-left-color Property

Description

The border-left-color property specifies the color of the left border of an element. Note that in many cases the shorthand CSS properties border-color or border-top are more convenient and preferable.

Initial value
currentColor
Applies to
All elements
Inherited
No
Media
Visual
Computed value
The computed color
Animatable
Yes
CSS Version
CSS2, CSS3
JavaScript syntax
object.style.borderLeftColor

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;
}

Give it a Try

Click the button below to experiment with this property.

Give it a Try!

Browser Support

Desktop
Explorer Edge Chrome Firefox Opera Safari
412113.51
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
118410.11?