<html>
<head>
<style>
#myDIV {
height: 250px;
width: 400px;
padding: 10px;
margin: 15px;
border-left: 10px solid red;
background-color: lightblue;
direction: rtl;
overflow: scroll;
}
</style>
</head>
<body>
<p>Click the button to get the width of the div's left border, in pixels.</p>
<button onclick="myFunction()">Try it</button>
<div id="myDIV">
The text direction of this div is right-to-left.<br>
And it has a scrollbar!
<p id="demo"></p>
</div>
<script>
function myFunction() {
var left = document.getElementById("myDIV").clientLeft;
document.getElementById("demo").innerHTML = "Border left width: " + left + "px";
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_element_clientleft_scrollbar by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:02:18 GMT -->
</html>