Use scrollWidth to detect text width