I have a div which contains different amount of text at different moments (determined by what the server decides to send). I want to find the height this div would take if rendered. At the point when I want the height, the div is not being rendered (display:none
). The display is to be set to 'block' later.
I have tried .offsetHeight
and it works well after I set display:block
for the div. However, I want the height at the time when display is set to 'none'. Any ideas?