CSS border-left Property
Example
Set the style of the left border:
p
{
border-style: solid;
border-left: thick double #ff0000;
}
Try it yourself »
Definition and Usage
The border-left shorthand property sets all the left border properties in one declaration.
The properties that can be set, are (in order): border-left-width, border-left-style, and border-left-color.
It does not matter if one of the values above are missing, e.g. border-left:solid #ff0000; is allowed.
Default value: | medium none color |
---|---|
Inherited: | no |
Animatable: | yes, see individual properties. Read about animatable Try it |
Version: | CSS1 |
JavaScript syntax: | object.style.borderLeft="3px dotted blue" Try it |
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Property | ||||||
---|---|---|---|---|---|---|
border-left | 1.0 | 12.0 | 4.0 | 1.0 | 3.5 | 1.0 |
Note: See individual browser support for each value below.
CSS Syntax
border-left: border-width border-style border-color|initial|inherit;
Property Values
Value | Description |
---|---|
border-left-width | Specifies the width of the left border. Default value is "medium" |
border-left-style | Specifies the style of the left border. Default value is "none" |
border-left-color | Specifies the color of the left border. Default value is the color of the element |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Related Pages
CSS tutorial: CSS Border
HTML DOM reference: borderLeft property