title: css/javascript to determine width of text or word vs. width of block element
body: <p>We have some application which present text on cell phones.  Some of the divs would have styling something like this:</p>
  
  <pre><code>width:150px;
  text-align:center;
  overflow:hidden;
  </code></pre>
  
  <p>It occurs to me that it would be nice to determine whether the width of any individual word within that div exceeded the width of its container, at least to alert customer support they should abbeviate it or do a workaround.  Is there any way to do that?  One idea I had was using PHP to wrap each word in a &lt;span&gt; tag, but I'd prefer something native to the DOM.</p>