Measure the text width in browsers