CSS Reference Property

border-left-color 5r4p5k

The border-left-color property is used to set the color of the left border of an element. 3i1y5z

Official Syntax 52n3v

  • Syntax:

    border-left-color: <color>
  • Initial: currentColor
  • Applies To: all elements
  • Animatable: yes, as a <color>

Values 6u6u2p

<color>
See the <color> property entry for a list of possible values.

Notes 3g6b1p

The border-left-color property can also inherit the value of the element’s parent’s left border color using the keyword inherit.

Examples 2w2wp

The following are all valid border-left-color values set on an element. The element’s border style and border width are also set using the border-left-width respectively.

.element {
    border-left-style: dotted;
    border-left-width: 10px;

    border-left-color: red;
    /* or */
    border-left-color: #44aacf;
    /* or */
    border-left-color: rgba(255,0,10,.5);
}
                

Live Demo 163835

Have a look at the live demo:

View this demo on the Codrops Playground

Browser 3n3564

The property works in all major browsers: Chrome, Firefox, Safari, Opera, IE, and on Android and iOS.

Written by

Last updated June 4, 2020 at 2:37 pm by Mary Lou

Do you have a suggestion, question or want to contribute? Submit an issue.