Start inline. Even with a 24px left border, clientLeft is 0.
Switch display.inline-block creates a layout box that reports borders.
Read again. Now clientLeft is 24.
Takeaway. Prefer block / inline-block when you need border measurements.
Compatibility
Browser Support
Element.clientLeft is Baseline Widely available (MDN: since July 2015). Safe across modern and older evergreen browsers.
✓ Baseline · Widely available
Element.clientLeft
Read-only left border width in CSS pixels — long-standing CSSOM View support.
99%Widely available
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
clientLeftExcellent
Bottom line: Safe for production. Remember inline elements return 0, and RTL overflow can include a left scrollbar width.
Frequently Asked Questions
A read-only integer: the width of the element's left border in CSS pixels. It does not include left margin or left padding.
No. MDN marks Element.clientLeft as Baseline Widely available (since July 2015). It is not Deprecated, Experimental, or Non-standard.
No. It is read-only. Change the left border with CSS (or element.style), then read clientLeft again.
When there is no left border, or when the element has display: inline — MDN notes inline elements always return 0 regardless of border.
Yes. If the element's text direction is right-to-left and overflow creates a vertical scrollbar on the left, that scrollbar width is included in clientLeft.
clientLeft is the left border width; clientTop is the top border width. Together they describe the border offset into the client area.