Cross browsing compatibility getTextDimension()

I have changed the innerText with the innerHTML for cross browsing compatibility. Firefox always retun 0 offsetwidth using innerText. With innerHtml, Chrome, Firefox and IE are working fine.