The border-left-width property sets how thick the left border is on an element. It is useful when you want precise control over quote bars and left-edge accents.
01
Left Width
Physical left edge.
02
thin / medium / thick
Keyword sizes.
03
px / em / rem
Exact length units.
04
medium Default
Browser default size.
05
Needs Style
Pair with style/color.
06
Longhand
Part of border-left.
Fundamentals
Definition and Usage
The border-left-width CSS property allows you to specify the thickness of the left border of an element. This property is part of the border longhand family and is used to control the width of the border along the left edge.
By adjusting this property, you can enhance visual separation between elements and create more defined layouts with subtle 1px dividers or prominent accent lines.
💡
Beginner Tip
border-left-width only sets thickness. Add border-left-style: solid; and border-left-color: black; so the border is visible, or use border-left: 5px solid black; as shorthand.
Foundation
📝 Syntax
The syntax for border-left-width is straightforward. It accepts keyword values or length units.
syntax.css
selector{border-left-width:<length> | thin | medium | thick;}
The value can be a keyword such as thin or a length such as 10px, 0.25em, or 1rem.
Syntax Rules
The initial value is medium, typically around 3 to 4 pixels.
Keywords: thin, medium, and thick.
Length values use units like px, em, or rem.
Pair with border-left-style and border-left-color for full control.
Use border-left shorthand when setting width, style, and color together.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
medium
Applies to
Left border width only
Inherited
No
Animatable
Yes, as a length
Common use
Quote bars, left accents, emphasis lines
Defaults
Default Value
The default value of border-left-width is medium, which typically corresponds to a width of around 3 to 4 pixels depending on the browser’s default settings.
Reference
💎 Property Values
The border-left-width property accepts keyword values and length units.
Value
Description
thin
A thin border width (typically 1px)
medium
A medium border width (default, typically 3–4px)
thick
A thick border width (typically 5–6px)
<length>
A specific width using a length unit like px, em, or rem
initial
Sets the property to its default value
inherit
Inherits the property value from its parent element
previewthin
previewmedium
previewthick
preview1px
preview4px
preview8px
Scope
Left Border Width and Text Direction
border-left-width always sets the thickness of the physical left border. Text direction does not move the border — compare with border-inline-start-width when building RTL layouts.
Leading edge accents that follow text direction in RTL
border-left
Width, style, and color together
When you want one shorthand for the full left border
Preview
👀 Live Preview
A box with a 10px left border width:
This element has a 10px left border width.
Uses border-left-width: 10px; with solid style and black color.
Hands-On
Examples Gallery
Try border-left-width with pixel lengths, keyword sizes, width comparisons, and left-edge overrides.
📚 Basic Left Border Widths
Set the left border width with style and color longhands so the line is visible.
Example 1 — 10px Left Border Width
Set the left border width of a div to 10px, matching the reference tutorial.
border-left-width-10px.html
<style>div{border-left-width:10px;border-left-style:solid;border-left-color:black;padding:0.75rem 1rem;}</style><div>This div has a 10px wide left border.</div>
10px sets an exact thickness on the physical left edge. Style and color longhands make the border visible.
Example 2 — thin Keyword on a Quote Bar
Use the thin keyword with a dashed blue left border on a callout.
border-left-width-thin.html
<style>.quote{border-left-width:thin;border-left-style:dashed;border-left-color:blue;padding:0.75rem 1rem;}</style><divclass="quote">This callout has a thin left border.</div>
The border shorthand sets all sides to 1px. border-left-width: 6px; then overrides only the left thickness for a stronger accent bar.
🧠 How border-left-width Works
1
You choose a thickness
Set a keyword like thin or a length like 10px.
Width rule
2
You add style and color
Pair the width with border-left-style and border-left-color.
Border setup
3
The browser draws the left edge
Only the physical left border uses that thickness. Top, right, and bottom sides stay unchanged.
Left edge
=
─
Sized left accent
Your element gets a clear left accent with the thickness you chose on the physical left edge.
Compatibility
Universal Browser Support
The border-left-width property is supported in all major browsers, including Chrome, Firefox, Safari, Edge, Opera, and Internet Explorer. It is one of the most reliable CSS border properties.
✓ Baseline · All browsers
Reliable left border widths on every platform
Chrome, Firefox, Safari, Edge, and Opera all support border-left-width consistently.
100%Universal support
Google Chrome69+ · Desktop & Mobile
Full support
Mozilla Firefox66+ · Desktop & Mobile
Full support
Apple Safari12.1+ · macOS & iOS
Full support
Microsoft Edge79+ · Chromium
Full support
Opera56+ · Modern versions
Full support
border-left-width property100% supported
Bottom line: Use border-left-width freely in any project. It works consistently across all browsers.
Wrap Up
Conclusion
The border-left-width property is a useful tool for controlling the thickness of the left border of elements. Whether you want a subtle 1px divider or a prominent accent line, adjusting the border width helps you achieve the desired visual effect.
Experiment with keyword values like thin and thick, or use exact lengths such as 2px and 4px to find the best fit for your design needs.
Use 1px or 2px for subtle UI dividers on the left edge
Pair width with style and color longhands for predictable results
Use rem when you want thickness to scale with root font size
Use the border-left shorthand when setting all three parts
Override only border-left-width when other sides use the border shorthand
❌ Don’t
Set width alone and forget a visible border style
Use border-left-width when you need a writing-mode-aware logical edge
Use very thick borders everywhere in minimal UI designs
Mix physical and logical width properties without a clear reason
Rely on medium when you need exact pixel control
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about border-left-width
Use these points when sizing the physical left edge.
5
Core concepts
─01
Left Width
Physical left edge.
Purpose
⚙️02
medium Default
Browser default size.
Default
📏03
thin / thick
Quick keywords.
Values
📝04
px / em / rem
Exact lengths.
Units
🔄05
One Edge Only
Other sides unchanged.
Scope
❓ Frequently Asked Questions
The border-left-width property sets the thickness of the border on the physical left side of an element only.
The initial value is medium, which is typically around 3 to 4 pixels depending on the browser.
Width alone does not always show a border. You also need a visible border-left-style such as solid and usually a color, or use the border-left shorthand.
border-left-width always sets the physical left edge thickness. border-inline-start-width follows writing direction, so it moves to the right in RTL layouts.
Length values like 2px, 4px, and 10px are common for quote bars and left accents. Keywords thin, medium, and thick are useful for quick sizing.