diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js
index <HASH>..<HASH> 100644
--- a/lib/OpenLayers/Map.js
+++ b/lib/OpenLayers/Map.js
@@ -172,9 +172,8 @@ OpenLayers.Map.prototype = {
         
         // Workaround for the fact that hidden elements return 0 for size.
         if (size.w == 0 && size.h == 0) {
-           var elementSize = Element.getDimensions(this.div);
-           size.w = elementSize.width; 
-           size.h = elementSize.height; 
+            size.w = parseInt(this.div.style.width);
+            size.h = parseInt(this.div.style.height);
         }
         return size;
     },
element.getDimensions doesn't check styles of parent elements, so when an element is hideen because of a parent, this breaks. fall back to style.width/height in cases where we have a 0,0 size.


git-svn-id: <URL>