Get the width or height of an element