Height of content inside div
The page content is loaded inside a div:
<div id="content">Some content</div>
div has a fixed height and scrolls in case of overflow. I want to adjust the height (reduce it) on the loading div, if the content doesn't require a fixed div height. How can the height of the content inside a div be measured?
I tried to work in a different way. No fixed height and after page load measuring div height and on overflow adjusting div height to a certain maximum. But this created problems with certain images in the content that did not have the specified height and width. The browser is returning the wrong div height because the images haven't loaded yet. Even with $ (window) .ready (...
Any help is appreciated!
source to share