CSS border-left-widthProperty
Example
Set the width of the left border:
p
{
border-style:solid;
border-left-width:15px;
}
Try it Yourself »
Property definition and usage instructions
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 actually resets 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 number that supports the property.
| Property | |||||
|---|---|---|---|---|---|
| border-left-width | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
Property value
| 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:border-left property
other extensions