                     maxHeight = Math.max(maxHeight, mt + child.height + mb);
                 }
 				xx = child.x + child.width;
-				var valign:* = ValuesManager.valuesImpl.getValue(child, "vertical-align");
-				marginObject.valign = valign;
 			}
             if (hostSizedToContent)
             {

		}
        
        private function setPositionAndHeight(child:IUIBase, top:Number, mt:Number, pt:Number,
                                             bottom:Number, mb:Number, pb:Number, h:Number):void
        {
            var heightSet:Boolean = false;
            
            var hh:Number = h;
            var ilc:ILayoutChild = child as ILayoutChild;
            if (!isNaN(top))
            {
                if (ilc)
                    ilc.setY(top + mt);
                else
                    child.y = top + mt;
                hh -= top + mt;
            }
            else 
            {
                if (ilc)
                    ilc.setY(mt + pt);
                else
                    child.y = mt + pt;
                hh -= mt + pt;
            }
            if (!isNaN(bottom))
            {
                if (!isNaN(top))
                {
                    if (ilc)
                        ilc.setHeight(hh - bottom - mb, true);
                    else 
                    {
                        child.height = hh - bottom - mb;
                        heightSet = true;
                    }
                }
                else
                {
                    if (ilc)
                        ilc.setY(h - bottom - mb - child.height);
                    else
                        child.y = h - bottom - mb - child.height;
                }
            }
            if (ilc)
            {
                if (!isNaN(ilc.percentHeight))
                    ilc.setHeight(h * ilc.percentHeight / 100, true);
            }
            if (!heightSet)
                child.dispatchEvent(new Event("sizeChanged"));
        }

                lastmr = mr;
                var marginObject:Object = {};
                verticalMargins[i] = marginObject;
                var valign:* = ValuesManager.valuesImpl.getValue(child, "vertical-align");
                marginObject.valign = valign;
                if (!hostSizedToContent)
                {
                    // if host is sized by parent,
                    // we can position and size children horizontally now
                    setPositionAndHeight(child, top, mt, padding.top, bottom, mb, padding.bottom, h, valign);
                    maxHeight = Math.max(maxHeight, mt + child.height + mb);
                }
                else
