Easy Tutorial
❮ Pr Border Sel Root ❯

CSS border-left-width Property

Example

Set the width of the left border:

p {
    border-style: solid;
    border-left-width: 15px;
}

Property Definition and Usage

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

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

Note: Always declare the border-style property before the border-left-width property. An element must have a border before you can change its width.

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

Browser Support

The numbers in the table specify the first browser version that fully supports the property.

Property Chrome IE Firefox Safari Opera
border-left-width 1.0 4.0 1.0 1.0 3.5

Property 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 define 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: border-left Property

❮ Pr Border Sel Root ❯