See the box stuck the bottom right. Right now it as a fixed height of 300px. Instead I would like to be just as high as necessary. Meaning I need the height to adjust automatically to the content. When I remove the height property it assumes full height.
Additionally, I would like to be able to “refresh” the height whenever I update the content via javascript (jQuery).
Your seeing a height of 100% because your style for
html, body, div, iframespecifies height of 100%. To override this, just set your height to “auto”. Like this:}
This will size the box so that it is only the same size as the content. You might also want to consider using the
max-heightproperty to set an upper limit though. Say something likemax-height:640px;.