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

CSS border-left-width property

CSS border-left-width property

Example

Set the width of the left border:

p

{

border-style:

solid

;

border-left-width:

15

px

;

}

Try it »


Property definition and usage

The border-left-width property sets the width of an element's left border.

It only works when the border style is not none. If the border style is none, the border width is actually reset to 0. Negative length values are not allowed.

**Note:** Always declare the border-style property before the border-left-width property. An element can only change its border width after it has a border.

Default value: medium
Inheritance: no
Version: CSS1
JavaScript syntax: object.style.borderLeftWidth="thick"

Browser support

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

property
border-left-width 1.0 4.0 1.0 1.0 3.5

Attribute values

Value Description
thin Defines a thin left border.
medium Default value. Defines a medium left border.
thick Defines a thick left border.
length Allows you to customize the width of the left border.
inherit Specifies that the border width should be inherited from the parent element.

Related Articles

CSS Tutorial: CSS Border

CSS Reference Manual: border-left property