 			var marginBottom:Object;
 			var margin:Object;
 			maxWidth = 0;
-			var horizontalMargins:Array = new Array(n);
-			
-            var hh:Number = layoutParent.resizableView.height;
-            var padding:Object = determinePadding();
-            if (isNaN(padding.paddingBottom))
-                padding.paddingBottom = 0;
-            hh -= padding.paddingTop + padding.paddingBottom;
-            var yy:int = padding.paddingTop;
+            
+            var w:Number = contentView.width;			
+            var hh:Number = contentView.height;
+            var yy:int = 0;
             var flexChildIndex:int;
             var ml:Number;
             var mr:Number;

            var lastmb:Number;
            var lastmt:Number;
            var halign:Object;
            
            for (var i:int = 0; i < n; i++)
            {
                var child:IUIBase = contentView.getElementAt(i) as IUIBase;
                if (child == actualChild)
                {
                    flexChildIndex = i;

    				mb = Number(marginBottom);
    				if (isNaN(mb))
    					mb = 0;
                    if (ilc)
                    {
                        if (!isNaN(ilc.percentHeight))
                            ilc.setHeight(contentView.height * ilc.percentHeight / 100, !isNaN(ilc.percentWidth));
                    }
    				if (marginLeft == "auto")
    					ml = 0;
    				else
