updated offsetWidth/Height to add css3 box-sizing property and use just width/height