CSS - border-left-width

The border-left-width CSS property sets the width of the left border of a box.

Example

 

CSS
.left-red-border { 
  border-left-width: thin;
  border-left-style: solid;
  border-left-color: #F00;
  padding: 10px;
}
HTML
<div class="left-red-border">
  Example of a border on the left side.
</div>

Syntax  

CSS
/* Any <length> value */
border-left-width: 10em;
border-left-width: 3vmax;
border-left-width: 6px;

/* A keyword */
border-left-width: thin;
border-left-width: medium;
border-left-width: thick;

border-left-width: inherit;

Values

<br-width>
Is either a non-negative explicit <length> value or a keyword denoting the thickness of the left border. The keyword must be one of the following values:
thin
 
A thin border
medium
 
A medium border
thick
 
A thick border
The specification doesn't define precisely the thickness of each fo the keywords, which is therefore implementation specific. Nevertheless, it requests that the thickness does follow the thin ≤ medium ≤ thick pattern and is constant on a single document.
inherit
Represents the calculated value of the border-left-width of the parent's element.

Formal syntax

CSS
<a href="css/border-left-width#br-width"><br-width></a><p>where <br><code><br-width> = <a href="css/length" title="Possible values: a number followed by'em', 'ex', 'ch', 'rem', 'px', 'cm', 'mm', 'in', 'vh', 'vw', 'vmin', 'vmax', 'pt', 'pc' or 'px', like 3px, 1.5cm, -0.5em or 0"><length></a> <a href="css/value_definition_syntax#single_bar" title="Single bar">|</a> thin <a href="css/value_definition_syntax#single_bar" title="Single bar">|</a> medium <a href="css/value_definition_syntax#single_bar" title="Single bar">|</a> thick</code></p>

Description  

The border-left-width CSS property sets the width of the left border of a box.

Initial valuemedium
Applies toall elements. It also applies to ::first-letter.
Inheritedno
Mediavisual
Computed valuethe absolute length or 0 if border-left-style is none or hidden
Animatableyes, as a length
Canonical orderthe unique non-ambiguous order defined by the formal grammar

Browser Compatibility  

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 1.0 1.0 (1.0) 4.0 3.5 1.0 (85)
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support ? ? ? ? ?

See Also  

Specifications  

Specification Status Comment
CSS Backgrounds and Borders Module Level 3
The definition of 'border-left-width' in that specification.
Candidate Recommendation No significant change
CSS Level 2 (Revision 1)
The definition of 'border-left-width' in that specification.
Recommendation No significant change
CSS Level 1
The definition of 'boder-left-width' in that specification.
Recommendation Initial definition

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/css/border-left-width

CSS CSS Borders CSS Property Reference