I have a container div around all the content in the site that dynamically stretches, have also got several other divs that stretch (all using the same method as 20 other sites I have).
Not matter what method is use with jQuery or JavaScript to get the height of the container, JavaScript and jQuery seem to return a value bigger that height of the container div.
Does anyone know why this would be happening?
Many Thanks
I use jquery in that works well :
What do you define as "height"? Are you wanting the borders and padding to be included in the calculation? Just padding? Borders, padding, and margins?
From what it sounds like, my hunch is saying you should be using the innerHeight()
function:
$(element).innerHeight();
Documentation: http://docs.jquery.com/CSS/innerHeight