CSS border-left Property

Description

The border-left property is a shorthand that sets the values of border-left-color, border-left-style, and border-left-width. These properties describe the left border of elements.

Initial value
See individual properties
Applies to
All elements
Inherited
No
Media
Visual
Computed value
See individual properties
Animatable
Yes
CSS Version
CSS1, CSS2, CSS3
JavaScript syntax
object.style.borderLeft

Syntax

border-left: <line-width> || <line-style> || <color> 

Values

Example

<div class="border">This is an example of the border-left property using a red solid border 3px in width.</div>
.border {
   border: 1px solid blue;
   border-left: 3px solid 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
1184Yes1?

Last updated by CSSPortal on: 12th October 2019