I ran into an issue where I needed to determine the height of a horizontal scrollbar.
This question and answer recommended using the clientHeight
property to calculate the difference. Unfortunately, this method no longer works as shown here: https://jsfiddle.net/fn8naww8/
So, how can I accurately retrieve the height of the scrollbar?
EDIT: It's worth noting that OSX does not distinguish between offsetHeight and clientHeight.
Here is the HTML code:
<div id="wrapper">
<div id="content"></div>
</div>
And the corresponding CSS:
#wrapper{
height:100px;
width:100%;
overflow-x:auto;
}
#content{
height:100%;
width:200%;
background:linear-gradient(to right, red , yellow);
}