Jquery get height of auto height element

Is there any way to return the height of an element that is already set to auto? I just get 0 when I call $("#element").height();

Here is the jquery code. The img.height() return 0 therefore the end result is off.

img.css({top: (img.parent().height() - img.height()) /2, left: (img.parent().outerWidth() - img.outerWidth()) / 2});

The HTML looks like this:

<div id="exploreImage" class="virtual-room-large" style="width: 288px; height: auto; top: 185px; left: 89px; ">
13
задан brenjt 14 April 2011 в 17:27
поделиться