include leading and trailing spaces in width calculation

clientWidth seems to ignore leading and trailing spaces