add setting of the element dimensions