After routing around many other questions I have not found an answer that fixes my problem.
I am writing a script to find out whether the div is overflowing. But when trying to retrieve the visible height with jQuery.height()
, jQuery.innerHeight()
or JavaScripts offsetHeight
. I am given the value of the whole div
(Including the part which is overflowing) i.e: the same value as scrollHeight.
The containing DIVs style:
{
overflow-x: hidden;
overflow-y: auto;
width: 73%;
bottom: 0px;
float: left;
height: 100%;
top: 0px;
}
I've created a mock up of the scenario on jsFiddle: http://jsfiddle.net/Lukedturnbull/L2bxmszv/3/ (Make sure to make the preview screen smaller to create the scroll bar)