adding css rule and documentElement.clientWidth for resizes to work on iOS