Update layout to fit elements