CSS Property border-left

border-left shorthand property defines the width, color, and style of the left border.


Initial value not specified
Inherited No.
Version CSS1
JavaScript syntax object.style.borderLeft="5px solid red"
Applies to All elements.

CSS Syntax

border-left: border-width border-style border-color; 

Property Values

The property values are listed in the following table.

Value Description
border-left-width Set the width of the left border
border-left-style Set the style of the left border
border-left-color Set the color of the left border
inherit Inherit the border-left property from the parent element

Browser compatibility

border-left Yes Yes Yes Yes Yes


An example showing how to use border-left CSS property.

    div {<!--from w  w  w. ja  v  a  2s  .  c o  m-->
        border-left: 1px dashed darkkhaki;
        background: lightyellow;

Click to view the demo