The border-left property sets the width, style, and color of the physical left border in one shorthand rule.
01
Left Side
Physical edge.
02
Shorthand
Width, style, color.
03
solid
Common style.
04
Quote Bars
Accent borders.
05
Longhands
width, style, color.
06
Classic CSS
Universal support.
Fundamentals
Definition and Usage
The border-left CSS property is a physical shorthand that sets the border on the left side of an element. It combines border-left-width, border-left-style, and border-left-color in one declaration.
Unlike logical properties such as border-inline-start, border-left always targets the physical left edge — even in RTL text. That makes it straightforward for classic LTR layouts, quote bars, and left accent dividers.
💡
Beginner Tip
For multilingual layouts that must adapt to RTL, consider border-inline-start instead of border-left so the accent bar follows the reading direction.
Foundation
📝 Syntax
border-left accepts border width, style, and color like other border shorthands:
syntax.css
selector{border-left:width style color;}
Basic Example
border-left.css
.box{border-left:5px solid red;}
Syntax Rules
Sets width, style, and color for the left border side only.
Omitted components use initial values: medium, none, currentcolor.
Any valid border width, style, and color values are accepted.
Always affects the physical left side, regardless of direction or writing-mode.
Use longhands when you need to set only width, style, or color on the left side.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
medium none currentcolor
Applies to
Left border side only
Inherited
No
Animatable
Partially (color and width)
Common use
Quote bars, left dividers, sidebar accents
Defaults
Default Value
The default value of border-left is medium none currentcolor. No visible border appears until you set a non-none style and a width greater than zero.
Reference
💎 Property Values
Component
Example
Meaning
border-width
4px, thin, 0.25rem
Thickness of the left border
border-style
solid, dashed, dotted
How the left border is drawn
border-color
red, #2563eb, currentcolor
Color of the left border
Common Value Types
4px solidsolid left border
3px dasheddashed style
6px solidthick accent
Scope
Left Border and Text Direction
border-left always draws on the physical left side. Text direction does not move the border — compare with logical properties when building RTL layouts.
LTR (direction: ltr)
Left border on the left side
leftright
RTL (direction: rtl)
Left border still on the left side
leftright
Compare
border-left vs related properties
Property
Targets
Best for
border-left
Physical left side only
Left accent bars and LTR quote dividers
border-inline-start
Logical inline-start side
Direction-aware leading borders in RTL layouts
border-right
Physical right side only
Right accent bars and trailing dividers
border
All four sides
Full box outlines
Preview
👀 Live Preview
A box with a blue border on the left side:
Blue border on the left side.
Uses border-left: 4px solid #2563eb;.
Hands-On
Examples Gallery
Try border-left with solid red borders, quote accents, RTL comparison, and dashed styles.
📚 Basic Left Borders
Add a border on the physical left side of an element.
Example 1 — 5px Solid Red Border
Add a solid red left border on a box, matching the reference tutorial.
border-left-basic.html
<style>.box{border-left:5px solid red;padding:10px;}</style><divclass="box">
This box has a 5px solid red left border.
</div>
Left borders make simple quote accent bars in LTR layouts.
How It Works
A left-side border creates a vertical accent at the physical left edge. Pair it with padding so text does not touch the border line.
🎨 RTL and Style Variations
See how border-left behaves in RTL and with different styles.
Example 3 — border-left in RTL
In RTL text, border-left stays on the physical left — unlike border-inline-start.
border-left-rtl.html
<style>.rtl-box{direction:rtl;padding:0.75rem 1rem;border-left:4px solid #059669;background:#ecfdf5;}</style><divclass="rtl-box">
حد فيزيكي على اليسار
</div>
Any valid border style works on the left side. A dashed left border adds visual emphasis without a full box outline.
🧠 How border-left Works
1
You set width, style, and color
The shorthand combines all three border components for the left side in one rule.
Shorthand
2
Browser draws the left edge
border-left applies only to the physical left side of the element box.
Apply
3
Other sides stay unchanged
Top, right, and bottom borders keep their own values unless you set them separately.
Scope
=
←
Left border applied
Your element shows a styled border on the physical left edge.
Compatibility
Modern Browser Support
The border-left property is supported in all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera.
✓ Baseline · Modern browsers
Physical left borders in every browser
Chrome, Edge, Firefox, Safari, and Opera have supported border-left since the earliest CSS versions.
99%Modern browser support
Google Chrome87+ · Desktop & Mobile
Full support
Mozilla Firefox66+ · Desktop & Mobile
Full support
Apple Safari14.1+ · macOS & iOS
Full support
Microsoft Edge87+ · All versions
Full support
Opera73+ · Modern versions
Full support
border-left property99% supported
Bottom line:border-left is one of the most reliable CSS border properties across all browsers.
Wrap Up
Conclusion
The border-left property controls the border on the physical left edge. Use it for quote bars, left dividers, and accent borders in classic LTR layouts.
Combine width, style, and color in one shorthand, or use border-left-width, border-left-style, and border-left-color when you need finer control.