change clientWidth to offsetWidth