use 'clientHeight' instead of 'getBoundingClientRect().height'