I am encountering an issue with images that have been set to display:none
. I am using javascript (
document.getElementById('elem').height
) to retrieve the height/width of these images.
While this method works in most browsers, IE is reporting the height as 0. This is likely due to the fact that the display property is set to none. When I remove the display:none property, the correct height is reported. I also tried wrapping the images in a div and setting the div's display to none instead, but this did not resolve the issue.
What is the common solution for handling this situation?