Everything seems beautiful, jQuery.height() and jQuery.innerHeight() have nothing to do with the overflow property. They will return heights, not just the visible part.
If you want to know the height of the content, you should use scrollHeight . This scrollHeight is a regular javascript attribute that you don't need to use jQuery
document.getElementById("wrapper").scrollHeight;
Or you can use jQuery selector
$('#wrapper')[0].scrollHeight;
See working jsfiddle: http://jsfiddle.net/scgz7an5/1/
note that
$('#wrapper').scrollHeight;
returns undefined.
UPDATE
You forgot the most important part of floating elements. You forgot to clean them.
Take a look at this jsfiddle, this is your right, but with floating elements cleared. There you see different values ββfor scrollHeight and jQuery.height() . See that .structureContent is one that has a scrollbar, not .content nor .width100 .
.structureContent has overflow:auto , and the scroll you see comes from it.
http://jsfiddle.net/L2bxmszv/5/
I added this class to clear your floating elements.
.clearfix:before, .clearfix:after, { content: '\0020'; display: block; overflow: hidden; visibility: hidden; width: 0; height: 0; } .clearfix:after { clear: both; } .clearfix { zoom: 1; }
The output was as follows:
.content 324 for scrollHeight 324 for clientHeight 324 for jQuery.height() .structureContent 324 for scrollHeight 276 for clientHeight 276 for jQuery.height()
Check out this great article on floating elements and clean them here: http://css-tricks.com/all-about-floats/