css - Centering components in a Layout -
i'm trying center picture , label vertical layout here's code wrote:
picture = new embedded(null, brandableresourcehelper.getinstance().newresource("image/icon.png")); lab = new label(); lab.setwidth(100, units_percentage); verticallayout col = new verticallayout(); col.addcomponent(picture); col.addcomponent(lab); col.setwidth(30, units_percentage); col.setcomponentalignment(picture, alignment.middle_center); col.setcomponentalignment(lab, alignment.middle_center);
here's wanna get:
here's i'm getting:
Comments
Post a Comment