autoset height and width of parent element if undefined, fixes #3