Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

CSS Border-left property

CSS border-left property

Example

Set the style of the left border:

p

{

border-style:

solid

;

border-left:

thick

double

#ff0000

;

}

Try it »


Property definition and usage

The border-left shorthand property sets all left border properties in a single declaration.

The properties that can be set are (in order): border-left-width, border-left-style, and border-left-color.

It is fine if one of the values is not set, for example border-left: solid #ff0000; is also allowed.

Default value: not specified
Inheritance: no
Version: CSS1
JavaScript syntax: object.style.borderLeft="3px solid blue"

Browser support

The numbers in the table indicate the first browser version that supports this property.

property
border-left 1.0 4.0 1.0 3.5 1.0

Attribute values

Value Description
border-left-width Specifies the width of the left border. See:border-left-width Possible values.
border-left-style Specifies the style of the left border. See:border-left-style Possible values.
border-left-color Specifies the color of the left border. See:border-left-color Possible values.
inherit Specifies that the settings of the border-left property should be inherited from the parent element.

Related Articles

CSS Tutorial: CSS Border